From 3625dfaad5901e7595a3541c8ddfe890fefff0a6 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sat, 15 Oct 2005 19:05:15 +0000 Subject: Clean up error pages by providing better backtraces git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../action_controller/templates/rescues/diagnostics.rhtml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'actionpack/lib/action_controller/templates/rescues/diagnostics.rhtml') 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 -%> -

<%=h @exception.class.to_s %> in <%=h (@request.parameters["controller"] || "").capitalize %>#<%=h @request.parameters["action"] || "" %>

-
<%=h Object.const_defined?(:RAILS_ROOT) ? @exception.message.gsub(RAILS_ROOT, "") : @exception.message %>
- -<% unless app_trace.empty? %>
<%=h app_trace.join("\n") %>
<% end %> +
<%=h @exception.clean_message %>
-<% unless framework_trace.empty? %> - Show framework trace - -<% end %> +<%= render_file(@rescues_path + "/_trace.rhtml", false) %> <%= render_file(@rescues_path + "/_request_and_response.rhtml", false) %> -- cgit v1.2.3