\Fuman_Exception_Manager

Handles all thrown php errors and exceptions.

With config value ->error->exit_on_error, a html dump with all error/exception info will be printed.

All caught errors/exceptions will be logged with Fuman_Util_Logger::error

Summary

Methods
Properties
Constants
__construct()
handleError()
handleException()
catchError()
$codes
No constants found
_handleDumpObject()
_findErrorTemplate()
_htmlDumpErrorObject()
_drawHeader()
_drawCode()
_drawOpenTable()
_drawCloseTable()
_drawBackTrace()
_backtrace()
$_dumpColors
N/A
No private methods found
No private properties found
N/A

Properties

$codes

$codes : array

php error codes as string

Type

array

$_dumpColors

$_dumpColors : 

Type

Methods

__construct()

__construct() 

Constructor

handleError()

handleError(integer  $errNumber, string  $errString, string  $errFile, integer  $errLine, string  $errContext) : void

Handles a php error.

Parameters

integer $errNumber
string $errString
string $errFile
integer $errLine
string $errContext

handleException()

handleException(\Exception  $exception) : void

Handle exception

Parameters

\Exception $exception

catchError()

catchError(  $a = null,   $b = null,   $c = null,   $d = null) 

Parameters

$a
$b
$c
$d

_handleDumpObject()

_handleDumpObject(\stdClass|\Exception|object  $errorObject) : void

Handle dump object

Parameters

\stdClass|\Exception|object $errorObject

@ishacky

_findErrorTemplate()

_findErrorTemplate(boolean  $default) : null|string

Finds error template

Parameters

boolean $default

Returns

null|string

_htmlDumpErrorObject()

_htmlDumpErrorObject(\stdClass|\Exception  $object) : string

Draws an error dump

Parameters

\stdClass|\Exception $object

@ishacky

Returns

string

_drawHeader()

_drawHeader(string  $type, string  $error, string  $file, string  $line) : string

Draws error dump header

Parameters

string $type
string $error
string $file
string $line

Returns

string

_drawCode()

_drawCode(string|null  $errFile = null, integer|null  $errLine = null) : string

Draws error dump code

Parameters

string|null $errFile
integer|null $errLine

Returns

string

_drawOpenTable()

_drawOpenTable() : string

Draws error dump open table

Returns

string

_drawCloseTable()

_drawCloseTable() : string

Draws error dump close table

Returns

string

_drawBackTrace()

_drawBackTrace(array  $backtrace, integer  $startDraw = 2) : string

Draws error dump back trace

Parameters

array $backtrace
integer $startDraw

Returns

string

_backtrace()

_backtrace(array|null  $backTrace = null) : array

Parses back trace to object

Parameters

array|null $backTrace

Returns

array