Fix "RuntimeError: can't modify frozen String" in static/error.html.erb.
Fixes a frequently occurring error in New Relic.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<% if CurrentUser.user.is_builder? && @exception.present? %>
|
<% if CurrentUser.user.is_builder? && @exception.present? %>
|
||||||
<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.force_encoding("utf-8") %></li>
|
<li><%= @exception.message.dup.force_encoding("utf-8") %></li>
|
||||||
<%- Rails.backtrace_cleaner.clean(@exception.backtrace).each do |b| -%>
|
<%- Rails.backtrace_cleaner.clean(@exception.backtrace).each do |b| -%>
|
||||||
<li style="list-style-type: none;"><%= b %></li>
|
<li style="list-style-type: none;"><%= b %></li>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
@@ -9,5 +9,5 @@
|
|||||||
<% elsif @error_message %>
|
<% elsif @error_message %>
|
||||||
<p><%= @error_message %></p>
|
<p><%= @error_message %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p><%= @exception.message.force_encoding("utf-8") %></p>
|
<p><%= @exception.message.dup.force_encoding("utf-8") %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user