Exception: Muxi::MuxiError
- Inherits:
-
StandardError
- Object
- StandardError
- Muxi::MuxiError
- Defined in:
- lib/muxi/errors.rb
Direct Known Subclasses
AuthenticationError, AuthorizationError, ConflictError, ConnectionError, NotFoundError, RateLimitError, ServerError, ValidationError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(code, message, status_code, details = nil) ⇒ MuxiError
constructor
A new instance of MuxiError.
Constructor Details
#initialize(code, message, status_code, details = nil) ⇒ MuxiError
Returns a new instance of MuxiError.
7 8 9 10 11 12 |
# File 'lib/muxi/errors.rb', line 7 def initialize(code, , status_code, details = nil) @code = code @status_code = status_code @details = details || {} super(code ? "#{code}: #{}" : ) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/muxi/errors.rb', line 5 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
5 6 7 |
# File 'lib/muxi/errors.rb', line 5 def details @details end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
5 6 7 |
# File 'lib/muxi/errors.rb', line 5 def status_code @status_code end |