Exception: DCMClient::Error
- Inherits:
-
StandardError
- Object
- StandardError
- DCMClient::Error
- Defined in:
- lib/dcm_client/error.rb
Overview
A parent error class makes it easier to trap any error from client code.
Direct Known Subclasses
Defined Under Namespace
Classes: NotFound, TimeoutError, UnprocessableEntity
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(arg, response = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(arg, response = nil) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dcm_client/error.rb', line 9 def initialize(arg, response=nil) self.response = response if (arg.respond_to?(:backtrace)) super(arg.) self.set_backtrace(arg.backtrace) if (arg.respond_to?(:response)) self.response = arg.response end else super(arg.to_s) end end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/dcm_client/error.rb', line 7 def response @response end |