Exception: TravelTimeAPI::ServerError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- TravelTimeAPI::ServerError
- Defined in:
- lib/traveltime_api.rb
Overview
Raised if API server has encountered an error.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Human readable error message.
Instance Method Summary collapse
-
#initialize(error) ⇒ ServerError
constructor
A new instance of ServerError.
- #to_s ⇒ Object
Constructor Details
#initialize(error) ⇒ ServerError
Returns a new instance of ServerError.
54 55 56 |
# File 'lib/traveltime_api.rb', line 54 def initialize(error) @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Human readable error message.
52 53 54 |
# File 'lib/traveltime_api.rb', line 52 def error @error end |
Instance Method Details
#to_s ⇒ Object
58 59 60 |
# File 'lib/traveltime_api.rb', line 58 def to_s "TravelTimeAPI::ServerError[#{@error}]" end |