Exception: CityGridExceptions::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- CityGridExceptions::APIError
- Defined in:
- lib/citygrid/citygrid_exceptions.rb
Overview
Define parent error classes All errors thrown in the API should extend APIError - Level 1
Direct Known Subclasses
AuthenticationError, AuthorizationError, GeneralDataError, GeneralError, HeaderError, RequestError, ResponseError, ResponseParseError, SpecificDataError
Instance Attribute Summary collapse
-
#curl ⇒ Object
Returns the value of attribute curl.
-
#request ⇒ Object
Returns the value of attribute request.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(request, response, msg = "An API error occurred", curl = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(request, response, msg = "An API error occurred", curl = nil) ⇒ APIError
Returns a new instance of APIError.
8 9 10 11 12 13 |
# File 'lib/citygrid/citygrid_exceptions.rb', line 8 def initialize request, response, msg = "An API error occurred", curl=nil @request = request @response = response @curl = curl super msg end |
Instance Attribute Details
#curl ⇒ Object
Returns the value of attribute curl.
6 7 8 |
# File 'lib/citygrid/citygrid_exceptions.rb', line 6 def curl @curl end |
#request ⇒ Object
Returns the value of attribute request.
6 7 8 |
# File 'lib/citygrid/citygrid_exceptions.rb', line 6 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/citygrid/citygrid_exceptions.rb', line 6 def response @response end |