Exception: TOS::Error
- Inherits:
-
StandardError
- Object
- StandardError
- TOS::Error
- Defined in:
- lib/tos/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status: nil, code: nil, request_id: nil, body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status: nil, code: nil, request_id: nil, body: nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 |
# File 'lib/tos/error.rb', line 7 def initialize(, status: nil, code: nil, request_id: nil, body: nil) super() @status = status @code = code @request_id = request_id @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/tos/error.rb', line 5 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/tos/error.rb', line 5 def code @code end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
5 6 7 |
# File 'lib/tos/error.rb', line 5 def request_id @request_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/tos/error.rb', line 5 def status @status end |