Skip to content
This repository
Browse code

Fixed broken error handling #1827 [Stefan Kaes]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1920 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 36fee9c02eef3f0d6bf2f60b46b37376225d07c1 1 parent e9cfe95
David Heinemeier Hansson authored July 25, 2005
9  actionpack/lib/action_controller/rescue.rb
@@ -68,10 +68,9 @@ def local_request? #:doc:
68 68
 
69 69
       # Renders a detailed diagnostics screen on action exceptions. 
70 70
       def rescue_action_locally(exception)
71  
-        @exception = exception
72  
-        @rescues_path = File.dirname(__FILE__) + "/templates/rescues/"
73  
-        add_variables_to_assigns
74  
-        @contents = @template.render_file(template_path_for_local_rescue(exception), false)
  71
+        @template.instance_variable_set("@exception", exception)
  72
+        @template.instance_variable_set("@rescues_path", File.dirname(__FILE__) + "/templates/rescues/")
  73
+        @template.instance_variable_set("@contents", @template.render_file(template_path_for_local_rescue(exception), false))
75 74
     
76 75
         @headers["Content-Type"] = "text/html"
77 76
         render_file(rescues_path("layout"), response_code_for_rescue(exception))
@@ -96,7 +95,7 @@ def perform_action_with_rescue #:nodoc:
96 95
                   callstack.slice!(0) if callstack.first["rescue.rb"]
97 96
                   file, line, method = *callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/).captures
98 97
 
99  
-                  message = "Exception at #{file}:#{line}#{" in `#{method}'" if method}."
  98
+                  message = "Exception at #{file}:#{line}#{" in `#{method}'" if method}." # `´ ( for ruby-mode)
100 99
 
101 100
                   Breakpoint.handle_breakpoint(context, message, file, line)
102 101
                 end

0 notes on commit 36fee9c

Please sign in to comment.
Something went wrong with that request. Please try again.