class ErrorHandler (View source)

Error handler that converts PHP errors and warnings to exceptions.

Properties

static protected $errorStack

Methods

static array
getErrorStack()

Returns the error stack.

static false
handleError(int $errno, string $errstr, string $errfile, int $errline)

No description

static Closure
handleErrorOnce(int $severity = E_WARNING)

Registers an error handler and returns a function that will restore the previous handler when invoked

Details

static array getErrorStack()

Returns the error stack.

Return Value

array

static false handleError(int $errno, string $errstr, string $errfile, int $errline)

Parameters

int $errno
string $errstr
string $errfile
int $errline

Return Value

false

Exceptions

Error

static Closure handleErrorOnce(int $severity = E_WARNING)

Registers an error handler and returns a function that will restore the previous handler when invoked

Parameters

int $severity PHP predefined error constant

Return Value

Closure

Exceptions

Exception if event of specified severity is emitted