aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/rescue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/rescue.rb')
-rw-r--r--actionpack/lib/action_controller/metal/rescue.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/rescue.rb b/actionpack/lib/action_controller/metal/rescue.rb
new file mode 100644
index 0000000000..bbca1b2179
--- /dev/null
+++ b/actionpack/lib/action_controller/metal/rescue.rb
@@ -0,0 +1,13 @@
+module ActionController #:nodoc:
+ module Rescue
+ extend ActiveSupport::Concern
+ include ActiveSupport::Rescuable
+
+ private
+ def process_action(*args)
+ super
+ rescue Exception => exception
+ rescue_with_handler(exception) || raise(exception)
+ end
+ end
+end