fixes #2312
This commit is contained in:
@@ -14,6 +14,7 @@ class ApplicationController < ActionController::Base
|
|||||||
|
|
||||||
rescue_from User::PrivilegeError, :with => :access_denied
|
rescue_from User::PrivilegeError, :with => :access_denied
|
||||||
rescue_from Danbooru::Paginator::PaginationError, :with => :render_pagination_limit
|
rescue_from Danbooru::Paginator::PaginationError, :with => :render_pagination_limit
|
||||||
|
rescue_from Exception, :with => :rescue_exception
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def api_check
|
def api_check
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<% if @error_message %>
|
<% if CurrentUser.user.is_builder? %>
|
||||||
<p><%= @error_message %></p>
|
<h1><%= @exception.class.to_s %> exception raised</h1>
|
||||||
|
<ul style="font-family: monospace; font-size: 1.2em; list-style-type: none;">
|
||||||
|
<li><%= @exception.message %></li>
|
||||||
|
<%- @exception.backtrace.each do |b| -%>
|
||||||
|
<li style="list-style-type: none;"><%= b %></li>
|
||||||
|
<%- end -%>
|
||||||
|
</ul>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p>Error: <%= @exception.to_s %></p>
|
<p><%= @exception.message %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user