October\Rain\Exception\ErrorHandler

Overview

ErrorHandler handles application exception events.


Protected Properties

protected static System\Classes\ExceptionBase $activeMask

activeMask used to mask any exception fired.

protected static array $maskLayers

maskLayers is a collection of masks, so multiples can be applied in order.

protected array $notFoundExceptions

notFoundExceptions will redirect to the 404 page when captured.


Public Methods

public static applyMask()

public static applyMask(Exception $exception): void 

applyMask prepares a mask exception to be used when any exception fires.

public static getDetailedMessage()

public static getDetailedMessage(Exception $exception): string 

getDetailedMessage returns a more descriptive error message.

public handleCustomError()

public handleCustomError($exception): mixed 

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

public handleDetailedError()

public handleDetailedError($exception): View 

handleDetailedError displays the detailed system exception page.

public handleException()

public handleException(Throwable $proposedException): mixed 

handleException handles all exceptions from the framework workflow. This method will mask any foreign exceptions with a "scent" of the native application's exception, so it can render correctly when displayed on the error page.

public static removeMask()

public static removeMask(): void 

removeMask destroys the prepared mask by applyMask()

Protected Methods

protected isNotFoundException()

protected isNotFoundException($exception): void

isNotFoundException returns true if the exception is 404-flavored