Exception: CaptureSessionsError
- Inherits:
-
StandardError
- Object
- StandardError
- CaptureSessionsError
- Defined in:
- lib/capture.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, body) ⇒ CaptureSessionsError
constructor
A new instance of CaptureSessionsError.
Constructor Details
#initialize(status, body) ⇒ CaptureSessionsError
Returns a new instance of CaptureSessionsError.
11 12 13 14 15 16 |
# File 'lib/capture.rb', line 11 def initialize(status, body) = body.is_a?(Hash) && body["error"].is_a?(String) ? body["error"] : "Capture Sessions API request failed with status #{status}" super() @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/capture.rb', line 9 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/capture.rb', line 9 def status @status end |