Merge branch 'copyright'
[rails.git] / config / initializers / abstract_adapter.rb
index cfa32e4e93325336f979fd4289bfd701398913f1..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: /
+        if ex.message =~ /^OSM::APITimeoutError: /
           raise OSM::APITimeoutError.new
           raise OSM::APITimeoutError.new
+        elsif ex.message =~ /^Timeout::Error: /
+          raise Timeout::Error.new("time's up!")
         else
           raise
         end
         else
           raise
         end