Exception: Layer::Exceptions::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Layer::Exceptions::Exception
show all
- Defined in:
- lib/layer/exceptions.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(original_exception = nil) ⇒ 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
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 message
"#{original_exception.message}\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
|