class ErrorHandler (View source)

Global error handler for Flow

Properties

protected array $exceptionalErrors

Methods

__construct()

Constructs this error handler - registers itself as the default error handler.

void
setExceptionalErrors(array $exceptionalErrors)

Defines which error levels result should result in an exception thrown.

void
handleError(int $errorLevel, string $errorMessage, string $errorFile, int $errorLine)

Handles an error by converting it into an exception.

Details

__construct()

Constructs this error handler - registers itself as the default error handler.

void setExceptionalErrors(array $exceptionalErrors)

Defines which error levels result should result in an exception thrown.

Parameters

array $exceptionalErrors

An array of E_* error levels

Return Value

void

void handleError(int $errorLevel, string $errorMessage, string $errorFile, int $errorLine)

Handles an error by converting it into an exception.

If error reporting is disabled, either in the php.ini or temporarily through the shut-up operator "@", no exception will be thrown.

Parameters

int $errorLevel

The error level - one of the E_* constants

string $errorMessage

The error message

string $errorFile

Name of the file the error occurred in

int $errorLine

Line number where the error occurred

Return Value

void

Exceptions

Exception
Exception