Detailed Description

ErrorHandler catches all php errors and transforms fatal errors into ErrorExceptions and non-fatal into log messages.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 19 of file ErrorHandler.php.

Public Member Functions

 __construct ($setExceptionHandler=false)
 
 handleError ($errno, $errstr, $errfile, $errline)
 
 handleException ($ex)
 

Static Public Member Functions

static getStackTrace ()
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $setExceptionHandler = false)

Constructor.

Parameters
$setExceptionHandlerBoolean indicating, if this instance should also set an exception handler to log exceptions (default: false)

Definition at line 31 of file ErrorHandler.php.

Member Function Documentation

◆ getStackTrace()

static getStackTrace ( )
static

Get the stack trace.

Returns
The stack trace as string

Definition at line 45 of file ErrorHandler.php.

◆ handleError()

handleError (   $errno,
  $errstr,
  $errfile,
  $errline 
)

Error handler.

Parameters
$errno
$errstr
$errfile
$errline
Returns
Boolean
Exceptions
ErrorException

Definition at line 66 of file ErrorHandler.php.

◆ handleException()

handleException (   $ex)

Exception handler.

Parameters
$ex

Definition at line 85 of file ErrorHandler.php.