diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8ee671255..9608ad8cc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -32,11 +32,9 @@ protected @exception = exception 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 elsif exception.is_a?(::ActiveRecord::RecordNotFound) - @exception = nil @error_message = "That record was not found" render :template => "static/error", :status => 404 else diff --git a/app/views/static/error.html.erb b/app/views/static/error.html.erb index e2aebe784..60e169309 100644 --- a/app/views/static/error.html.erb +++ b/app/views/static/error.html.erb @@ -6,6 +6,8 @@
<%= @error_message %>
<% else %><%= @exception.message %>
<% end %>