instance method
rescue_action_locally
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v3.1.12 PrivateAvailable in: v3.0.20 v3.1.12
Signature
rescue_action_locally(request, exception)
Render detailed diagnostics for unhandled exceptions rescued from a controller action.
Parameters
-
requestreq -
exceptionreq
Source
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 79
def rescue_action_locally(request, exception)
template = ActionView::Base.new([RESCUES_TEMPLATE_PATH],
:request => request,
:exception => exception,
:application_trace => application_trace(exception),
:framework_trace => framework_trace(exception),
:full_trace => full_trace(exception)
)
file = "rescues/#{@@rescue_templates[exception.class.name]}.erb"
body = template.render(:file => file, :layout => 'rescues/layout.erb')
render(status_code(exception), body)
end
Defined in actionpack/lib/action_dispatch/middleware/show_exceptions.rb line 79
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ShowExceptions