% 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 %>
<%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %>
<% unless app_trace.empty? %><%=h app_trace.join("\n") %>
<% end %>
<% unless framework_trace.empty? %>
Show framework trace
<% end %>
<%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %>