blob: c9ea00ef8fcec43e9d4b3dcc87e87b366cf33894 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<%
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"].capitalize %>#<%=h @request.parameters["action"] %>
</h1>
<p><%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %></p>
<% unless app_trace.empty? %><pre><code><%=h app_trace.join("\n") %></code></pre><% end %>
<% 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 + "/_request_and_response.rhtml", false) %>
|