core/model/modx/error/moderrorhandler.class.php

Show: inherited
Table of Contents

Package
modx  
Subpackage
error  

\modErrorHandler

Package: modx\error

The base PHP error handler class for the modX framework.

Properties

Propertypublic\modX  $modx= 'null'

A reference to the modX instance.
Default valuenullDetails
Type
\modX
Propertypublicarray  $stack= 'null'

A stack of errors.
Default valuenullDetails
Type
array

Methods

methodpublic__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.

methodpublichandleError( 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
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.

Returns
Type Description
boolean True if the error was handled or false if the default PHP error handler should be invoked to handle it.
methodpublictoString( mixed $error ) : string

Converts an error to a readable string.

Parameters
Name Type Description
$error mixed

The error to convert.

Returns
Type Description
string The parsed error string.
Details
Access
public  
Documentation was generated by DocBlox 0.18.1.