Module: ActionController::Rescue

Module | ActionController::Rescue
In: | lib/action_controller/rescue.rb

Actions that fail to perform as expected throw exceptions. These exceptions can either be rescued for the public view (with a nice user-friendly explanation) or for the developers view (with tons of debugging information). The developers view is already implemented by the Action Controller, but the public view should be tailored to your specific application. So too could the decision on whether something is a public or a developer request.

You can tailor the rescuing behavior and appearance by overwriting the following two stub methods.

### Methods

local_request? log_error rescue_action rescue_action_in_public rescue_action_locally

### Protected Instance methods

local_request?(

Overwrite to expand the meaning of a local request in order to show local rescues on other occurrences than the remote IP being 127.0.0.1. For example, this could include the IP of the developer machine when debugging remotely.

log_error(exception)

Overwrite to implement custom logging of errors. By default logs as fatal.

rescue_action(exception)

Exception handler called when the performance of an action raises an exception.

rescue_action_in_public(exception)

Overwrite to implement public exception handling (for requests answering false to `local_request?`).

rescue_action_locally(exception)

Renders a detailed diagnostics screen on action exceptions.

[Validate]