Exception: Layer::Exceptions::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Layer::Exceptions::Exception
- Defined in:
- lib/layer/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#original_exception ⇒ Object
readonly
Returns the value of attribute original_exception.
Instance Method Summary collapse
-
#initialize(original_exception = nil) ⇒ Exception
constructor
A new instance of Exception.
- #message ⇒ Object
- #response_json ⇒ Object
Constructor Details
#initialize(original_exception = nil) ⇒ Exception
Returns a new instance of Exception.
17 18 19 |
# File 'lib/layer/exceptions.rb', line 17 def initialize(original_exception = nil) @original_exception = original_exception end |
Instance Attribute Details
#original_exception ⇒ Object (readonly)
Returns the value of attribute original_exception.
15 16 17 |
# File 'lib/layer/exceptions.rb', line 15 def original_exception @original_exception end |
Instance Method Details
#message ⇒ Object
21 22 23 |
# File 'lib/layer/exceptions.rb', line 21 def "#{original_exception.}\n\n#{JSON.pretty_generate(response_json)}\n\n" end |
#response_json ⇒ Object
25 26 27 |
# File 'lib/layer/exceptions.rb', line 25 def response_json JSON.parse(original_exception.http_body) end |