Exception: Fleet::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Fleet::Error
- Defined in:
- lib/fleet/error.rb
Direct Known Subclasses
Constant Summary collapse
- HTTP_CODE_MAP =
{ 400 => 'BadRequest', 401 => 'Unauthorized', 403 => 'Forbidden', 404 => 'NotFound', 405 => 'MethodNotAllowed', 406 => 'NotAcceptable', 408 => 'RequestTimeout', 409 => 'Conflict', 412 => 'PreconditionFailed', 413 => 'RequestEntityTooLarge', 414 => 'RequestUriTooLong', 415 => 'UnsupportedMediaType', 416 => 'RequestRangeNotSatisfiable', 417 => 'ExpectationFailed', 500 => 'InternalServerError', 501 => 'NotImplemented', 502 => 'BadGateway', 503 => 'ServiceUnavailable', 504 => 'GatewayTimeout' }
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
-
#initialize(msg, error_code = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(msg, error_code = nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 |
# File 'lib/fleet/error.rb', line 7 def initialize(msg, error_code=nil) super(msg) @error_code = error_code end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
5 6 7 |
# File 'lib/fleet/error.rb', line 5 def cause @cause end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
4 5 6 |
# File 'lib/fleet/error.rb', line 4 def error_code @error_code end |