Clean backtraces in uploads/show, static/error.json.

This commit is contained in:
evazion
2018-09-23 11:44:45 -05:00
parent 3414d27c78
commit b4cf423058
5 changed files with 21 additions and 13 deletions

View File

@@ -1,11 +1,8 @@
<% if CurrentUser.user.try(: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.dup.force_encoding("utf-8") %></li>
<%- Rails.backtrace_cleaner.clean(@exception.backtrace).each do |b| -%>
<li style="list-style-type: none;"><%= b %></li>
<%- end -%>
</ul>
<h1><%= @exception.class.to_s %> exception raised</h1>
<p><%= @exception.message.dup.force_encoding("utf-8") %></p>
<%= render "static/backtrace", backtrace: @exception.backtrace %>
<% elsif @error_message %>
<p><%= @error_message %></p>
<% else %>