This commit is contained in:
albert
2013-03-03 15:33:36 -05:00
parent 0137f7ff79
commit a214c12e5c
4 changed files with 10 additions and 11 deletions

View File

@@ -13,7 +13,14 @@ class ApplicationController < ActionController::Base
protected
def rescue_exception(exception)
@exception = exception
render :template => "static/error", :status => 500
if exception.is_a?(::ActiveRecord::StatementInvalid) && exception.to_s =~ /statement timeout/
@exception = nil
@error_message = "The database timed out running your query."
render :template => "static/error", :status => 500
else
render :template => "static/error", :status => 500
end
end
def render_pagination_limit