Methods
C
N
R
Class Public methods
new(app, rescuers = {}, &block)
   # File actionpack/lib/action_dispatch/middleware/rescue.rb, line 3
3:     def initialize(app, rescuers = {}, &block)
4:       @app, @rescuers = app, {}
5:       rescuers.each { |exception, rescuer| rescue_from(exception, rescuer) }
6:       instance_eval(&block) if block_given?
7:     end
Instance Public methods
call(env)
    # File actionpack/lib/action_dispatch/middleware/rescue.rb, line 9
 9:     def call(env)
10:       @app.call(env)
11:     rescue Exception => exception
12:       if rescuer = @rescuers[exception.class.name]
13:         env['action_dispatch.rescue.exception'] = exception
14:         rescuer.call(env)
15:       else
16:         raise exception
17:       end
18:     end
Instance Protected methods
rescue_from(exception, rescuer)
    # File actionpack/lib/action_dispatch/middleware/rescue.rb, line 21
21:       def rescue_from(exception, rescuer)
22:         exception = exception.class.name if exception.is_a?(Exception)
23:         @rescuers[exception.to_s] = rescuer
24:       end