Exception: ReverseGeocode::GeocodeError
- Inherits:
-
StandardError
- Object
- StandardError
- ReverseGeocode::GeocodeError
- Defined in:
- lib/reverse_geocode.rb
Constant Summary collapse
- ERRORS =
{ 400 => "Bad Request", 500 => "Server Error", 601 => "Missing Query or Address", 602 => "Unknown Address", 603 => "Unavailable Address", 604 => "Unknown Directions", 610 => "Bad Key", 620 => "Too Many Queries" }
Instance Method Summary collapse
-
#initialize(error_code) ⇒ GeocodeError
constructor
A new instance of GeocodeError.
Constructor Details
#initialize(error_code) ⇒ GeocodeError
Returns a new instance of GeocodeError.
20 21 22 |
# File 'lib/reverse_geocode.rb', line 20 def initialize(error_code) super("#{error_code}: #{ERRORS[error_code] || 'Unknown Error'}") end |