aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml')
-rw-r--r--actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml15
1 files changed, 2 insertions, 13 deletions
diff --git a/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml b/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
index 80634b2d34..584659252a 100644
--- a/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
@@ -1,20 +1,9 @@
-<%
- clean_backtrace = @exception.backtrace.collect { |line| Object.const_defined?(:RAILS_ROOT) ? line.gsub(RAILS_ROOT, "") : line }
- app_trace = clean_backtrace.reject { |line| line =~ /(vendor|dispatch|ruby)/ }
- framework_trace = clean_backtrace - app_trace
-%>
-
<h1>
<%=h @exception.class.to_s %> in
<%=h (@request.parameters["controller"] || "<controller not set>").capitalize %>#<%=h @request.parameters["action"] || "<action not set>" %>
</h1>
-<pre><%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %></pre>
-
-<% unless app_trace.empty? %><pre><code><%=h app_trace.join("\n") %></code></pre><% end %>
+<pre><%=h @exception.clean_message %></pre>
-<% unless framework_trace.empty? %>
- <a href="#" onclick="document.getElementById('framework_trace').style.display='block'; return false;">Show framework trace</a>
- <pre id="framework_trace" style="display:none"><code><%=h framework_trace.join("\n") %></code></pre>
-<% end %>
+<%= render_file(@rescues_path + "/_trace.rhtml", false) %>
<%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %>