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
- $activeMask - used to mask any exception fired. (defined in October\Rain\Exception\ErrorHandler)
- $maskLayers - is a collection of masks, so multiples can be applied in order. (defined in October\Rain\Exception\ErrorHandler)
- $notFoundExceptions - will redirect to the 404 page when captured. (defined in October\Rain\Exception\ErrorHandler)
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.
Inherited Public Methods
- applyMask() - prepares a mask exception to be used when any exception fires. (defined in October\Rain\Exception\ErrorHandler)
- handleException() - handles all exceptions from the framework workflow. This method will mask. (defined in October\Rain\Exception\ErrorHandler)
- removeMask() - destroys the prepared mask by applyMask(). (defined in October\Rain\Exception\ErrorHandler)
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
- isNotFoundException() - returns true if the exception is 404-flavored. (defined in October\Rain\Exception\ErrorHandler)