Exception: Cerberus::Exception::HttpError
- Inherits:
-
StandardError
- Object
- StandardError
- Cerberus::Exception::HttpError
- Defined in:
- lib/cerberus/exception/http_error.rb
Overview
Custom exception raised when an HTTP exception is raised but we want to handle it differently than simply presenting it to the end-user
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(httpMsg, responseObj = nil) ⇒ HttpError
constructor
Init with exception message and response object if one is available.
Constructor Details
#initialize(httpMsg, responseObj = nil) ⇒ HttpError
Init with exception message and response object if one is available
16 17 18 19 20 21 |
# File 'lib/cerberus/exception/http_error.rb', line 16 def initialize(httpMsg, responseObj = nil) @response = responseObj super("An error occurred executing the HTTP request: #{httpMsg}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/cerberus/exception/http_error.rb', line 11 def response @response end |