Exception: Gonebusy::EntitiesErrorErrorException
- Inherits:
-
APIException
- Object
- StandardError
- APIException
- Gonebusy::EntitiesErrorErrorException
- Defined in:
- lib/gonebusy/exceptions/entities_error_error_exception.rb
Instance Attribute Summary collapse
-
#message ⇒ String
description of error.
Attributes inherited from APIException
Instance Method Summary collapse
-
#initialize(reason, context) ⇒ EntitiesErrorErrorException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, context) ⇒ EntitiesErrorErrorException
The constructor.
12 13 14 15 16 17 18 19 |
# File 'lib/gonebusy/exceptions/entities_error_error_exception.rb', line 12 def initialize(reason, context) super(reason, context) begin hash = APIHelper.json_deserialize(@context.response.raw_body) unbox(hash) rescue TypeError end end |
Instance Attribute Details
#message ⇒ String
description of error
7 8 9 |
# File 'lib/gonebusy/exceptions/entities_error_error_exception.rb', line 7 def @message end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
23 24 25 |
# File 'lib/gonebusy/exceptions/entities_error_error_exception.rb', line 23 def unbox(hash) @message = hash['message'] end |