handle some common error cases
This commit is contained in:
@@ -18,6 +18,10 @@ protected
|
||||
@exception = nil
|
||||
@error_message = "The database timed out running your query."
|
||||
render :template => "static/error", :status => 500
|
||||
elsif exception.is_a?(::ActiveRecord::RecordNotFound)
|
||||
@exception = nil
|
||||
@error_message = "That record was not found", :status => 404
|
||||
render :template => "static/error", :status => 500
|
||||
else
|
||||
render :template => "static/error", :status => 500
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user