This commit is contained in:
r888888888
2014-11-25 14:58:00 -08:00
parent 0be70c44a8
commit e362d73bb3
2 changed files with 10 additions and 3 deletions

View File

@@ -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

View File

@@ -1,5 +1,11 @@
<% if @error_message %>
<p><%= @error_message %></p>
<% if CurrentUser.user.is_builder? %>
<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 %>
<p>Error: <%= @exception.to_s %></p>
<p><%= @exception.message %></p>
<% end %>