ErrorHandler

System Error Handler, this class handles application exception events.

 class Winter\Storm\Exception\ErrorHandler

Properties

protected static $activeMask : Throwable | null

A prepared mask exception used to mask any exception fired.

protected static $maskLayers : array

A collection of masks, so multiples can be applied in order.

Methods

public static applyMask (Throwable $exception) : void

Prepares a mask exception to be used when any exception fires.

Parameters
Property Description
$exception
Throwable

The mask exception.

Returns
void

public beforeHandleError ($exception) : void

We are about to display an error page to the user, provide an opportunity to handle extra functions.

Parameters
Property Description
$exception
mixed
Returns
void

public static getDetailedMessage (Throwable $exception) : string

Returns a more descriptive error message if application debug mode is turned on.

Parameters
Property Description
$exception
Throwable
Returns
string

public handleCustomError () : mixed

Check if using a custom error page, if so return the contents.

Return NULL if a custom error is not set up.

Returns
mixed

Error page contents.

public handleDetailedError (Throwable $exception) : Illuminate\View\View | string

Displays the detailed system exception page.

Parameters
Property Description
$exception
Throwable
Returns
Illuminate\View\View | string

Object containing the error page.

public handleException (Throwable $proposedException) : mixed

All exceptions are piped through this method 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.

Parameters
Property Description
$proposedException
Throwable

The exception candidate that has been thrown.

Returns
mixed

Error page contents

public static removeMask () : void

Destroys the prepared mask by applyMask()

Returns
void

Extended by

Class Description
ErrorHandler

System Error Handler, this class handles application exception events.

Copyright © 2024 Winter CMS