model/modx/error/moderrorhandler.class.php
- package
- modx
- subpackage
- error
- Classes
- modErrorHandler
Description
The base PHP error handler class for the modX framework.
\modErrorHandler
- package
- modx
- subpackage
- error
- Properties
- $modx
- $stack
- Methods
- __construct
- handleError
- toString
Description
The base PHP error handler class for the modX framework.
Properties
$modx
\modX $modx = 'null'
Details
-
\modX
A reference to the modX instance. - visibility
- public
- default
- null
- final
- false
- static
- false
$stack
array $stack = 'null'
Details
- array
A stack of errors. - visibility
- public
- default
- null
- final
- false
- static
- false
Methods
__construct
__construct(
\modX $modx, array $stack
=
array
)
:
Construct a new modErrorHandler instance.
Arguments
- $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.
Details
- visibility
- public
- final
- false
- static
- false
handleError
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().
Arguments
- $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.
Output
- boolean
- True if the error was handled or false if the default PHP error handler should be invoked to handle it.
Details
- visibility
- public
- final
- false
- static
- false
toString
toString(
mixed $error
)
:
string
Converts an error to a readable string.
Arguments
- $error
- mixed
The error to convert.
Output
- string
- The parsed error string.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public