mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
11af089cee
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
14 lines
289 B
Ruby
14 lines
289 B
Ruby
module ActionDispatch
|
|
class Rescue
|
|
def initialize(app, rescuer)
|
|
@app, @rescuer = app, rescuer
|
|
end
|
|
|
|
def call(env)
|
|
@app.call(env)
|
|
rescue Exception => exception
|
|
env['action_dispatch.rescue.exception'] = exception
|
|
@rescuer.call(env)
|
|
end
|
|
end
|
|
end
|