Exception: Chroma::ChromaError
- Inherits:
-
StandardError
- Object
- StandardError
- Chroma::ChromaError
- Defined in:
- lib/chroma/errors.rb
Overview
ChromaError is the base error from which all other more specific Chrome errors derive.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, body: nil, response: nil) ⇒ ChromaError
constructor
A new instance of ChromaError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, status: nil, body: nil, response: nil) ⇒ ChromaError
Returns a new instance of ChromaError.
14 15 16 17 18 19 |
# File 'lib/chroma/errors.rb', line 14 def initialize( = nil, status: nil, body: nil, response: nil) @message = @status = status @body = body @response = response end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/chroma/errors.rb', line 11 def body @body end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
10 11 12 |
# File 'lib/chroma/errors.rb', line 10 def error @error end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/chroma/errors.rb', line 9 def @message end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/chroma/errors.rb', line 7 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
12 13 14 |
# File 'lib/chroma/errors.rb', line 12 def status @status end |
Instance Method Details
#to_s ⇒ Object
21 22 23 24 |
# File 'lib/chroma/errors.rb', line 21 def to_s status_value = @status.nil? ? "" : "(Status #{@status}) " "#{status_value}#{@message}" end |