This middleware is responsible for logging exceptions and showing a debugging page in case the request is local.
Methods
Constants
RESCUES_TEMPLATE_PATH | = | File.join(File.dirname(__FILE__), 'templates') |
Class Public methods
Instance Public methods
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 14 14: def call(env) 15: begin 16: response = @app.call(env) 17: 18: if response[1]['X-Cascade'] == 'pass' 19: body = response[2] 20: body.close if body.respond_to?(:close) 21: raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}" 22: end 23: rescue Exception => exception 24: raise exception if env['action_dispatch.show_exceptions'] == false 25: end 26: 27: exception ? render_exception(env, exception) : response 28: end