From 36fee9c02eef3f0d6bf2f60b46b37376225d07c1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 25 Jul 2005 09:39:57 +0000 Subject: Fixed broken error handling #1827 [Stefan Kaes] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1920 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/rescue.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index 071dd7daf1..ae6127afba 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -68,10 +68,9 @@ module ActionController #:nodoc: # Renders a detailed diagnostics screen on action exceptions. def rescue_action_locally(exception) - @exception = exception - @rescues_path = File.dirname(__FILE__) + "/templates/rescues/" - add_variables_to_assigns - @contents = @template.render_file(template_path_for_local_rescue(exception), false) + @template.instance_variable_set("@exception", exception) + @template.instance_variable_set("@rescues_path", File.dirname(__FILE__) + "/templates/rescues/") + @template.instance_variable_set("@contents", @template.render_file(template_path_for_local_rescue(exception), false)) @headers["Content-Type"] = "text/html" render_file(rescues_path("layout"), response_code_for_rescue(exception)) @@ -96,7 +95,7 @@ module ActionController #:nodoc: callstack.slice!(0) if callstack.first["rescue.rb"] file, line, method = *callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/).captures - message = "Exception at #{file}:#{line}#{" in `#{method}'" if method}." + message = "Exception at #{file}:#{line}#{" in `#{method}'" if method}." # `´ ( for ruby-mode) Breakpoint.handle_breakpoint(context, message, file, line) end -- cgit v1.2.3