method
show?
v7.1.3.2 -
Show latest stable
- Class:
ActionDispatch::ExceptionWrapper
show?(request)public
No documentation available.
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 177
def show?(request)
# We're treating `nil` as "unset", and we want the default setting to be
# `:all`. This logic should be extracted to `env_config` and calculated
# once.
config = request.get_header("action_dispatch.show_exceptions")
# Include true and false for backwards compatibility.
case config
when :none
false
when :rescuable
rescue_response?
when true
ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead.")
true
when false
ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead.")
false
else
true
end
end