Exception: Invoiced::ErrorBase
- Inherits:
-
StandardError
- Object
- StandardError
- Invoiced::ErrorBase
- Defined in:
- lib/invoiced/error/error_base.rb
Direct Known Subclasses
ApiConnectionError, ApiError, AuthenticationError, InvalidRequestError, RateLimitError
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message = nil, status_code = nil, error = nil) ⇒ ErrorBase
constructor
A new instance of ErrorBase.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, status_code = nil, error = nil) ⇒ ErrorBase
Returns a new instance of ErrorBase.
7 8 9 10 11 |
# File 'lib/invoiced/error/error_base.rb', line 7 def initialize(=nil, status_code=nil, error=nil) @message = @status_code = status_code @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/invoiced/error/error_base.rb', line 5 def error @error end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/invoiced/error/error_base.rb', line 3 def @message end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
4 5 6 |
# File 'lib/invoiced/error/error_base.rb', line 4 def status_code @status_code end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/invoiced/error/error_base.rb', line 13 def to_s "(#{@status_code}): #{@message}" end |