aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml
blob: 80634b2d342a88e36fdcf23c4e93a995cb35d625 (plain) (tree)
1
2
3
4
5
6
7
8
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 %>

<% 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) %>