Abstract Class Misago\ActionController\Rescue

You may overwrite any of these methods to handle errors and exceptions raised within your application.

Inheritence

Extends:
Misago

Public instance attributes

Protected instance attributes

Methods

Public instance methods

__construct()

is_local_request()

Checks wether the request originates from localhost or a remote computer.

You may overwrite this function in you application to declare what is to be considered as a local request.

By default the following is considered a local request:

- PHP is runned on command-line (CLI);
- remote address is 127.0.0.1. 

log_error($exception)

Logs an exception. By default logs as ERROR.

render_optional_error_file($status_code)

Tries to render a static error page. At first it tries to load a localized file (for instance 500.fr.html), then tries to load a generic file (500.html), and falls back to display the raw error.

rescue_action_in_public($exception)

Catches exceptions raised on production, to remote computers. Defaults to call render_optional_error_file().

rescue_action_locally($exception)

Catches exceptions raised locally (for instance in development or on the server). Displays detailed informations about the raised exception.

rescue_php_error($errno, $errstr, $errfile=null, $errline=null, array $errcontext=null)

Catches PHP errors and logs them using Misago\Logger.