diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 54d3e64fb..8ee671255 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,6 +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 protected def api_check diff --git a/app/views/static/error.html.erb b/app/views/static/error.html.erb index 8f553f39a..e2aebe784 100644 --- a/app/views/static/error.html.erb +++ b/app/views/static/error.html.erb @@ -1,5 +1,11 @@ -<% if @error_message %> -

<%= @error_message %>

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

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

+ <% else %> -

Error: <%= @exception.to_s %>

+

<%= @exception.message %>

<% end %>