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