]> git.openstreetmap.org Git - rails.git/commitdiff
Remove redundant creation of an exception object
authorTom Hughes <tom@compton.nu>
Fri, 2 Dec 2016 09:38:18 +0000 (09:38 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 2 Dec 2016 09:38:18 +0000 (09:38 +0000)
app/controllers/application_controller.rb

index a52c006faed8bde165c4d5df292e7be510c1de5c..2b6d62bb52521d3811f5fa46844a6c034ed79fb3 100644 (file)
@@ -360,10 +360,6 @@ class ApplicationController < ActionController::Base
     ex = ex.original_exception
 
     if ex.is_a?(ActiveRecord::StatementInvalid) && ex.message =~ /execution expired/
-      ex = Timeout::Error.new
-    end
-
-    if ex.is_a?(Timeout::Error)
       render :action => "timeout"
     else
       raise