[Misc] Show explicitly set error message for janitor+

Previously the unsupported format message was not shown. Also show log_code
This commit is contained in:
Earlopain 2022-09-17 17:24:58 +02:00
parent 978afa5138
commit efaef59dfa
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897

View File

@ -1,11 +1,12 @@
<% if CurrentUser.user.try(:is_janitor?) && @exception.present? %>
<h1><%= @exception.class.to_s %> exception raised</h1>
<p><%= @exception.message.dup.force_encoding("utf-8") %></p>
<p><%= @message || @exception.message.dup.force_encoding("utf-8") %></p>
<p>Log ID: <%= @log_code || "(none)" %></p>
<%= render "static/backtrace", backtrace: @exception.backtrace %>
<% elsif @message %>
<p><%= @message %></p>
<p>Log ID: <%= @log_code || '(none)' %></p>
<p>Log ID: <%= @log_code || "(none)" %></p>
<% else %>
<p>An error happened but there are no details provided. That's pretty odd.</p>
<% end %>