diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 42c82653d..9608ad8cc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,7 +14,7 @@ class ApplicationController < ActionController::Base rescue_from User::PrivilegeError, :with => :access_denied rescue_from Danbooru::Paginator::PaginationError, :with => :render_pagination_limit - # rescue_from Exception, :with => :rescue_exception + rescue_from Exception, :with => :rescue_exception protected def api_check diff --git a/app/views/static/error.html.erb b/app/views/static/error.html.erb index 60e169309..5065e87d8 100644 --- a/app/views/static/error.html.erb +++ b/app/views/static/error.html.erb @@ -1,4 +1,6 @@ -<% if CurrentUser.user.is_builder? %> +<% if @error_message %> +

<%= @error_message %>

+<% elsif CurrentUser.user.is_builder? %>

<%= @exception.class.to_s %> exception raised

-<% elsif @error_message %> -

<%= @error_message %>

<% else %>

<%= @exception.message %>

<% end %>