From 7169fcdea7271ac87a9a67783b0b08a092106d34 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 21 Feb 2013 16:18:31 +0100 Subject: OpenTox error handling for NoMethodError --- lib/error.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/error.rb') 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 -- cgit v1.2.3