Exception: PFS::Error
- Inherits:
-
StandardError
- Object
- StandardError
- PFS::Error
- Defined in:
- lib/pfs/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#wrapped_error ⇒ Object
readonly
Returns the value of attribute wrapped_error.
Instance Method Summary collapse
-
#initialize(error) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(error) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 |
# File 'lib/pfs/error.rb', line 7 def initialize(error) @wrapped_error = error @response = @wrapped_error.response if @wrapped_error.respond_to?(:response) @status = structured_response[:status] super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/pfs/error.rb', line 5 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/pfs/error.rb', line 5 def status @status end |
#wrapped_error ⇒ Object (readonly)
Returns the value of attribute wrapped_error.
5 6 7 |
# File 'lib/pfs/error.rb', line 5 def wrapped_error @wrapped_error end |