From 11af089cee0a0e744e267d32becfe2c66a586d31 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 2 May 2009 23:02:22 -0500 Subject: Extract ActionController rescue templates into Rescue and ShowExceptions middleware. This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public. --- actionpack/lib/action_controller/dispatch/dispatcher.rb | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'actionpack/lib/action_controller/dispatch/dispatcher.rb') diff --git a/actionpack/lib/action_controller/dispatch/dispatcher.rb b/actionpack/lib/action_controller/dispatch/dispatcher.rb index 25844bf2a2..c0eb359547 100644 --- a/actionpack/lib/action_controller/dispatch/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatch/dispatcher.rb @@ -75,18 +75,10 @@ module ActionController end def _call(env) - begin - run_callbacks :before_dispatch - Routing::Routes.call(env) - rescue Exception => exception - if controller ||= (::ApplicationController rescue Base) - controller.call_with_exception(env, exception) - else - raise exception - end - ensure - run_callbacks :after_dispatch, :enumerator => :reverse_each - end + run_callbacks :before_dispatch + Routing::Routes.call(env) + ensure + run_callbacks :after_dispatch, :enumerator => :reverse_each end def flush_logger -- cgit v1.2.3