From ab6ff859067b35bda62e9a92fcd710cf925ba2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 19 Jul 2010 14:49:20 +0200 Subject: No need to create a new module in the previous commit. --- actionpack/lib/action_controller/metal/rescue.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/lib/action_controller/metal/rescue.rb') diff --git a/actionpack/lib/action_controller/metal/rescue.rb b/actionpack/lib/action_controller/metal/rescue.rb index bbca1b2179..cc2b020e03 100644 --- a/actionpack/lib/action_controller/metal/rescue.rb +++ b/actionpack/lib/action_controller/metal/rescue.rb @@ -3,6 +3,15 @@ module ActionController #:nodoc: extend ActiveSupport::Concern include ActiveSupport::Rescuable + def rescue_with_handler(exception) + if ((exception.respond_to?(:original_exception)) && + (orig_exception = exception.original_exception) && + (orig_handler = handler_for_rescue(orig_exception))) + exception = orig_exception + end + super(exception) + end + private def process_action(*args) super -- cgit v1.2.3