Class Fault
Global error handling (triggered errors and uncaught exceptions) and backtrace formatting.
- Core\Object implements Core\Chainable
-
Core\Set
implements
Core\Accessor
-
Core\Fault
Package: Core
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Used by:
xc_dump_bt()Located at Fault.inc.php
Methods summary
protected
|
|
protected
boolean
|
|
protected
|
#
_handle( mixed $errorOrException, string $message = null, boolean $plainFormat = false )
Prints out error and stops script execution if error is fatal or error threshold was reached. |
protected
string
|
|
protected
|
|
protected
string
|
|
public
boolean
|
#
catchError( integer $errorCode, string $message = null, string $filename = null, integer $line = null, mixed $context = null, boolean $silentError = null )
Handler for triggered errors. |
public
|
#
catchException(
Handler for uncaught exceptions. Processes exception and all chained previous exceptions (if any) and stops script execution. |
public
|
|
public
array[]
|
#
backtrace( array $source = null, string & $filename = null, integer & $line = null )
Fetches and pre-processes a backtrace. |
public
string
|
|
public
string
|
|
public static
static
|
#
instance( )
Returns the singleton instance. The fault handler can be configured
using the |
public
boolean
|
#
isErrorDeadly( integer $errorType )
Determines whether the error type causes the script to stop execution. |
Methods inherited from Core\Object
__autocreateFactory(),
__call(),
__processParameters(),
__toString(),
attachMethod(),
chain(),
getValueForKey(),
getValueForKeyPath(),
getValueForUndefinedKey(),
hash(),
issetValueForKey(),
setValueForKey(),
setValueForKeyPath(),
setValueForUndefinedKey(),
uuid()
Constants summary
Constants inherited from Core\Object
AnyParameterType,
AutochainParameterType,
AutocreateParameterType,
BooleanParameterType,
CharParameterType,
EnumParameterType,
IntegerParameterType,
RealParameterType,
StringParameterType,
UserParameterType
Properties summary
protected
integer
|
$_v_errorCount
Number of incidents handled so far. |
#
0
|
protected
|
$_v_linkage
The Linkage system instance used in backtraces and to render module URLs. |
|
protected
|
$_v_linkageFormat
The Linkage system instance used in backtraces to display module names. |
|
protected static
|
$_instance
Singleton instance. |
Magic properties
public read-only
array
|
$backtrace
Current backtrace (includes KVC property access calls). |
public read-only
integer
|
$errorCount
Number of incidents handled so far. |
public read-only
|
$linkage
Linkage instance used in backtraces and to render module URLs. |
public read-only
|
$linkageFormat
Linkage instance used in backtraces to display module names. |