% base_dir = File.expand_path(File.dirname(__FILE__)) clean_backtrace = @exception.backtrace.collect { |line| line.gsub(base_dir, "").gsub("/../config/environments/../../", "") } app_trace = clean_backtrace.reject { |line| line[0..6] == "vendor/" || line.include?("dispatch.cgi") } framework_trace = clean_backtrace - app_trace %>
<%=h @exception.message %>
<% unless app_trace.empty? %><%=h app_trace.collect { |line| line.gsub("/../", "") }.join("\n") %>
<% end %>
<% unless framework_trace.empty? %>
Show framework trace
<% end %>
<%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %>