System\Classes\ErrorHandler

Overview

ErrorHandler handles application exception events

Extends

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties


Public Methods

public beforeReport()

public beforeReport($exception): void

beforeReport allows hooking the application exception handler

public static getDetailedMessage()

public static getDetailedMessage(Exception $exception): string 

getDetailedMessage returns a more descriptive error message based on the context.

public handleCustomError()

public handleCustomError($exception): void

public handleDetailedError()

public handleDetailedError($exception): View 

handleDetailedError displays the detailed system exception page.

Show inherited public methods

Inherited Public Methods

Protected Methods

protected handleCustomAccessDenied()

protected handleCustomAccessDenied(): mixed 

handleCustomAccessDenied checks if running the backend and shows the backend access denied page.

protected handleCustomGeneralError()

protected handleCustomGeneralError(): mixed 

handleCustomGeneralError looks up an error page using the CMS route "/error". If the route does not exist, this function will use the error view found in the CMS module.

protected handleCustomNotFound()

protected handleCustomNotFound(): mixed 

handleCustomNotFound checks if using a custom 404 page, if so return the contents. Return NULL if a custom 404 is not set up.

protected handleTwigRuntimeError()

protected handleTwigRuntimeError($exception): void

handleTwigRuntimeError maps errors that occur within Twig, usually masking Http exceptions

Show inherited protected methods

Inherited Protected Methods