fixes #2316 (and similar post error messages)
This commit is contained in:
@@ -14,7 +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
|
rescue_from Exception, :with => :rescue_exception
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def api_check
|
def api_check
|
||||||
|
|||||||
@@ -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>
|
<h1><%= @exception.class.to_s %> exception raised</h1>
|
||||||
<ul style="font-family: monospace; font-size: 1.2em; list-style-type: none;">
|
<ul style="font-family: monospace; font-size: 1.2em; list-style-type: none;">
|
||||||
<li><%= @exception.message %></li>
|
<li><%= @exception.message %></li>
|
||||||
@@ -6,8 +8,6 @@
|
|||||||
<li style="list-style-type: none;"><%= b %></li>
|
<li style="list-style-type: none;"><%= b %></li>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</ul>
|
</ul>
|
||||||
<% elsif @error_message %>
|
|
||||||
<p><%= @error_message %></p>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<p><%= @exception.message %></p>
|
<p><%= @exception.message %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user