]> git.openstreetmap.org Git - rails.git/commitdiff
Check for wrapped timeout errors properly.
authorTom Hughes <tom@compton.nu>
Thu, 21 May 2009 21:55:30 +0000 (21:55 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 21 May 2009 21:55:30 +0000 (21:55 +0000)
config/initializers/abstract_adapter.rb

index cfa32e4e93325336f979fd4289bfd701398913f1..24d7c56e1b5843480473011573b596d04ec2cb08 100644 (file)
@@ -13,7 +13,7 @@ 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
         else
           raise
           raise OSM::APITimeoutError.new
         else
           raise