Merge branch 'copyright'
[rails.git] / config / initializers / abstract_adapter.rb
index 7b22a3cc6ccbd95cf5deda3203de5bbb87985d05..5cc24d25c38489183a869661f7f3c68db3227a83 100644 (file)
@@ -13,8 +13,10 @@ module ActiveRecord
           old_log(sql, name)
         end
       rescue ActiveRecord::StatementInvalid => ex
           old_log(sql, name)
         end
       rescue ActiveRecord::StatementInvalid => ex
-        if ex =~ /^OSM::APITimeoutError: /
-          raise OSM::APITimeoutError
+        if ex.message =~ /^OSM::APITimeoutError: /
+          raise OSM::APITimeoutError.new
+        elsif ex.message =~ /^Timeout::Error: /
+          raise Timeout::Error.new("time's up!")
         else
           raise
         end
         else
           raise
         end