I'm using a web service in Ruby script and occasionally I get errors. I
want to add error handling code, but do not know how to describe the
error to Ruby. Here's the error:
GeoNames::APIError: {"message"=>"ERROR: canceling statement due to
statement timeout", "value"=>13}
What do I put after "rescue"? I can't leave it blank because I have more
than one error to capture.
Service is geonames.org BTW.
Another error I have to capture is:
GeoNames::APIError: {"message"=>"we are afraid we could not find a
neighbourhood for latitude and longitude :33.793038,-118.327683",
"value"=>15}
Thanks. Sorry returns aren't working, so no paragraphs.
···
--
Posted via http://www.ruby-forum.com/.