fixes #2316 (and similar post error messages)

This commit is contained in:
Toks
2014-11-30 14:48:51 -05:00
parent cdd17de0af
commit 90bca638bf
2 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -1,4 +1,6 @@
<% if CurrentUser.user.is_builder? %>
<% if @error_message %>
<p><%= @error_message %></p>
<% elsif 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>
@@ -6,8 +8,6 @@
<li style="list-style-type: none;"><%= b %></li>
<%- end -%>
</ul>
<% elsif @error_message %>
<p><%= @error_message %></p>
<% else %>
<p><%= @exception.message %></p>
<% end %>