From 1ed264bc60f3c76ba7fab339806fa1757702a46b Mon Sep 17 00:00:00 2001 From: Ryan Dao Date: Wed, 30 Jul 2014 15:35:47 +0700 Subject: Retrieve source code for the entire stack trace Provide the ability to extract the source code of the entire exception stack trace, not just the frame raising the error. This improves debugging capability of the error page, especially for framework-related errors. --- .../middleware/templates/rescues/_trace.html.erb | 44 ++++++++++++++++++---- 1 file changed, 36 insertions(+), 8 deletions(-) (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb') diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb index b181909bff..f62caf51d7 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb @@ -1,9 +1,4 @@ -<% - traces = { "Application Trace" => @application_trace, - "Framework Trace" => @framework_trace, - "Full Trace" => @full_trace } - names = traces.keys -%> +<% names = @traces.keys %>

Rails.root: <%= defined?(Rails) && Rails.respond_to?(:root) ? Rails.root : "unset" %>

@@ -16,9 +11,42 @@ <%= name %> <%= '|' unless names.last == name %> <% end %> - <% traces.each do |name, trace| %> + <% @traces.each do |name, trace| %>
;"> -
<%= trace.join "\n" %>
+
<% trace.each do |frame| %><%= frame[:trace] %>
<% end %>
<% end %> + + -- cgit v1.2.3