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.
45 46 47 |
# File 'lib/traveltime_api.rb', line 45 def initialize(error) @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Human readable error message.
43 44 45 |
# File 'lib/traveltime_api.rb', line 43 def error @error end |
Instance Method Details
#to_s ⇒ Object
49 50 51 |
# File 'lib/traveltime_api.rb', line 49 def to_s "TravelTimeAPI::ServerError[#{@error}]" end |