aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-25 09:39:57 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-25 09:39:57 +0000
commit36fee9c02eef3f0d6bf2f60b46b37376225d07c1 (patch)
tree8428a53e195a8d27cad1a9951793b37556fd84b5 /actionpack
parente9cfe955cc2aea23f197db8e72595857f8384737 (diff)
downloadrails-36fee9c02eef3f0d6bf2f60b46b37376225d07c1.tar.gz
rails-36fee9c02eef3f0d6bf2f60b46b37376225d07c1.tar.bz2
rails-36fee9c02eef3f0d6bf2f60b46b37376225d07c1.zip
Fixed broken error handling #1827 [Stefan Kaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1920 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/rescue.rb9
1 files changed, 4 insertions, 5 deletions
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