Files
danbooru/app/views/static/error.html.erb
evazion 183a7e07e3 pixiv: fix failbooru when uploading bad pixiv id posts.
Fixes an "incompatible character encodings: UTF-8 and ASCII-8BIT"
exception when uploading a deleted Pixiv post.

Caused by the Pixiv API error message not having the encoding set to UTF-8.
2017-11-21 14:11:59 -06:00

14 lines
554 B
Plaintext

<% if CurrentUser.user.is_builder? && @exception.present? %>
<h1><%= @exception.class.to_s %> exception raised</h1>
<ul style="font-family: monospace; font-size: 1.2em; list-style-type: none;">
<li><%= @exception.message.force_encoding("utf-8") %></li>
<%- Rails.backtrace_cleaner.clean(@exception.backtrace).each do |b| -%>
<li style="list-style-type: none;"><%= b %></li>
<%- end -%>
</ul>
<% elsif @error_message %>
<p><%= @error_message %></p>
<% else %>
<p><%= @exception.message.force_encoding("utf-8") %></p>
<% end %>