instance method
call
Ruby on Rails 8.0.4
Since v3.0.20Signature
call(env)
No documentation comment.
Parameters
-
envreq
Source
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 31
def call(env)
@app.call(env)
rescue Exception => exception
request = ActionDispatch::Request.new env
backtrace_cleaner = request.get_header("action_dispatch.backtrace_cleaner")
wrapper = ExceptionWrapper.new(backtrace_cleaner, exception)
request.set_header "action_dispatch.exception", wrapper.unwrapped_exception
request.set_header "action_dispatch.report_exception", !wrapper.rescue_response?
if wrapper.show?(request)
render_exception(request.dup, wrapper)
else
raise exception
end
end
Defined in actionpack/lib/action_dispatch/middleware/show_exceptions.rb line 31
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ShowExceptions