Object
# File 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
# File 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
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.