summaryrefslogtreecommitdiff
path: root/lib/error.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-02-21 16:18:31 +0100
committerChristoph Helma <helma@in-silico.ch>2013-02-21 16:18:31 +0100
commit7169fcdea7271ac87a9a67783b0b08a092106d34 (patch)
treeaa3b8e274b500ec0def7c6c545d49a6caacd6580 /lib/error.rb
parent97d39cf958ecb9d7b35073a9a56945552073b678 (diff)
OpenTox error handling for NoMethodError
Diffstat (limited to 'lib/error.rb')
-rw-r--r--lib/error.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/error.rb b/lib/error.rb
index 3dd2950..51168f4 100644
--- a/lib/error.rb
+++ b/lib/error.rb
@@ -1,7 +1,7 @@
require 'open4'
# add additional fields to Exception class to format errors according to OT-API
-class RuntimeError
+module OpenToxError
attr_accessor :http_code, :uri
def initialize message, uri=nil
super message
@@ -46,6 +46,14 @@ class RuntimeError
end
+class RuntimeError
+ include OpenToxError
+end
+
+class NoMethodError
+ include OpenToxError
+end
+
module OpenTox
class Error < RuntimeError