]> git.openstreetmap.org Git - rails.git/commitdiff
Handle Timeout::Error exceptions which are caught by ActiveRecord.
authorTom Hughes <tom@compton.nu>
Mon, 11 Jan 2010 09:55:55 +0000 (09:55 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 11 Jan 2010 09:55:55 +0000 (09:55 +0000)
config/initializers/abstract_adapter.rb

index 24d7c56e1b5843480473011573b596d04ec2cb08..fbae428cbbc5cc9b2dbdbfef312db0694ea90f27 100644 (file)
@@ -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