From 266455cf25aba942b8717ceb0269d66f719b5696 Mon Sep 17 00:00:00 2001 From: Yuki Nishijima Date: Tue, 3 Nov 2015 06:54:34 -0800 Subject: Deprecate exception#original_exception in favor of exception#cause --- actionpack/lib/action_controller/metal/rescue.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (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 68cc9a9c9b..81b9a7b9ed 100644 --- a/actionpack/lib/action_controller/metal/rescue.rb +++ b/actionpack/lib/action_controller/metal/rescue.rb @@ -7,10 +7,8 @@ module ActionController #:nodoc: include ActiveSupport::Rescuable def rescue_with_handler(exception) - if (exception.respond_to?(:original_exception) && - (orig_exception = exception.original_exception) && - handler_for_rescue(orig_exception)) - exception = orig_exception + if exception.cause && handler_for_rescue(exception.cause) + exception = exception.cause end super(exception) end -- cgit v1.2.3