Exception: Hws::Connectors::Exception::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Hws::Connectors::Exception::Error
- Defined in:
- lib/hws-connectors/exception.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#reason ⇒ Object
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(err = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(err = nil) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 |
# File 'lib/hws-connectors/exception.rb', line 5 def initialize(err = nil) case err.class.name when 'Hash' @reason = err['reason'] super(err['message']) else super(err) end end |
Instance Attribute Details
#reason ⇒ Object
Returns the value of attribute reason.
3 4 5 |
# File 'lib/hws-connectors/exception.rb', line 3 def reason @reason end |