]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Combine the address and netmask for an ACL in one column
[rails.git] / app / controllers / application_controller.rb
index 74576555134e26a77040c95781fdfbac7158bc2c..a90a295fb35349c397784599a437ce5941ab45cf 100644 (file)
@@ -300,7 +300,13 @@ class ApplicationController < ActionController::Base
       yield
     end
   rescue ActionView::Template::Error => ex
-    if ex.original_exception.is_a?(Timeout::Error)
+    ex = ex.original_exception
+
+    if ex.is_a?(ActiveRecord::StatementInvalid) and ex.message =~ /^Timeout::Error/
+      ex = Timeout::Error.new
+    end
+
+    if ex.is_a?(Timeout::Error)
       render :action => "timeout"
     else
       raise