Exception: Omie::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Omie::Error
- Defined in:
- lib/omie/error.rb
Overview
This is the base Omie exception class. Rescue it if you want to catch any exceptions that your request might raise. In addition to the message, it may receive the response, a RestClient::Response object that can be used to improve the error messages.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#after_initialize ⇒ Object
Callback to be overridden by underlying classes.
-
#initialize(message = nil, response = nil) ⇒ Error
constructor
Initialize the exception with the message and the request’s response and call the #after_initialize callback.
Constructor Details
#initialize(message = nil, response = nil) ⇒ Error
Initialize the exception with the message and the request’s response and call the #after_initialize callback
13 14 15 16 17 |
# File 'lib/omie/error.rb', line 13 def initialize( = nil, response = nil) @message = @response = response after_initialize end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
9 10 11 |
# File 'lib/omie/error.rb', line 9 def @message end |
#response ⇒ Object
Returns the value of attribute response.
9 10 11 |
# File 'lib/omie/error.rb', line 9 def response @response end |
Instance Method Details
#after_initialize ⇒ Object
Callback to be overridden by underlying classes
20 |
# File 'lib/omie/error.rb', line 20 def after_initialize; end |