From: Tom Hughes Date: Mon, 11 Jan 2010 09:55:55 +0000 (+0000) Subject: Handle Timeout::Error exceptions which are caught by ActiveRecord. X-Git-Tag: live~6891^2~21 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/70bb55b35e35154bb36f43ef4ea64ccc1601bbc5 Handle Timeout::Error exceptions which are caught by ActiveRecord. --- diff --git a/config/initializers/abstract_adapter.rb b/config/initializers/abstract_adapter.rb index 24d7c56e1..fbae428cb 100644 --- a/config/initializers/abstract_adapter.rb +++ b/config/initializers/abstract_adapter.rb @@ -15,6 +15,8 @@ module ActiveRecord rescue ActiveRecord::StatementInvalid => ex if ex.message =~ /^OSM::APITimeoutError: / raise OSM::APITimeoutError.new + elsif ex.message =~ /^Timeout::Error: / + raise Timeout::Error.new else raise end