core/model/modx/error/moderrorhandler.class.php
- Package
- modx
- Subpackage
- error
\modErrorHandler
Package: modx\error
The base PHP error handler class for the modX framework.
Properties
Methods
__construct(
\modX $modx, array $stack
=
array()
)
:
void
Construct a new modErrorHandler instance.
Parameters
Name | Type | Description |
---|---|---|
$modx | \modX | &$modx A reference to the modX instance. |
$stack | array | A stack of errors that can be passed in. Send a non-array value to prevent any errors from being recorded in the stack. |
handleError(
integer $errno, string $errstr, string $errfile
=
null, integer $errline
=
null, array $errcontext
=
null
)
:
boolean
Handles any recoverable PHP errors or calls to trigger_error().
Parameters
Returns
Name | Type | Description |
---|---|---|
$errno | integer | An integer number indicating the type of error. |
$errstr | string | A description of the error. |
$errfile | string | The filename in which the error occured. |
$errline | integer | The line number in the file where the error occured. |
$errcontext | array | A copy of all variables and their values available at the time the error occured and in the scope of the script being executed. |
Type | Description |
---|---|
boolean | True if the error was handled or false if the default PHP error handler should be invoked to handle it. |