ErrorHandler
in package
ErrorHandler that can be used to catch internal PHP errors and convert to an ErrorException instance.
Table of Contents
- $stack : array<string|int, mixed>
- Active stack
- addError() : void
- Add an error to the stack
- clean() : void
- Stop all active handler
- getNestedLevel() : int
- Get the current nested level
- start() : mixed
- Starting the error handler
- started() : bool
- Check if this error handler is active
- stop() : null|ErrorException
- Stopping the error handler
Properties
$stack
Active stack
protected
static array<string|int, mixed>
$stack
= []
Methods
addError()
Add an error to the stack
public
static addError(int $errno[, string $errstr = '' ][, string $errfile = '' ], int $errline) : void
Parameters
- $errno : int
- $errstr : string = ''
- $errfile : string = ''
- $errline : int
Return values
void —clean()
Stop all active handler
public
static clean() : void
Return values
void —getNestedLevel()
Get the current nested level
public
static getNestedLevel() : int
Return values
int —start()
Starting the error handler
public
static start([int $errorLevel = E_WARNING ]) : mixed
Parameters
- $errorLevel : int = E_WARNING
Return values
mixed —started()
Check if this error handler is active
public
static started() : bool
Return values
bool —stop()
Stopping the error handler
public
static stop([bool $throw = false ]) : null|ErrorException
Parameters
- $throw : bool = false
-
Throw the ErrorException if any