Constants

MC_DEBUG_NOTICE

MC_DEBUG_NOTICE

SETTING_RESTART_ON_EXCEPTION

SETTING_RESTART_ON_EXCEPTION

LOG_SUPPRESSED_ERRORS

LOG_SUPPRESSED_ERRORS

Properties

$handlingError

$handlingError : 

Type

Methods

__construct()

__construct(\ManiaControl\ManiaControl  $maniaControl) 

Construct a new error handler instance

Parameters

\ManiaControl\ManiaControl $maniaControl

init()

init() 

Initialize error handler features

triggerDebugNotice()

triggerDebugNotice(string  $message) 

Trigger a Debug Notice to the ManiaControl Website

Parameters

string $message

handleError()

handleError(integer  $errorNumber, string  $errorString, string  $errorFile = null, integer  $errorLine = -1, array  $errorContext = array(), boolean  $onShutdown = false) : boolean

ManiaControl Error Handler

Parameters

integer $errorNumber
string $errorString
string $errorFile
integer $errorLine
array $errorContext
boolean $onShutdown

Returns

boolean

getErrorTag()

getErrorTag(integer  $errorLevel) : string

Get the Prefix for the given Error Level

Parameters

integer $errorLevel

Returns

string

isFatalError()

isFatalError(integer  $errorNumber) : boolean

Test whether the given Error Number represents a Fatal Error

Parameters

integer $errorNumber

Returns

boolean

handleShutdown()

handleShutdown() 

Handle PHP Process Shutdown

handleException()

handleException(\Throwable  $exception, boolean  $shutdown = true) 

ManiaControl Exception Handler

Parameters

\Throwable $exception
boolean $shutdown

isUserErrorNumber()

isUserErrorNumber(integer  $errorNumber) : boolean

Check if the given Error Number is a User Error

Parameters

integer $errorNumber

Returns

boolean

parseBackTrace()

parseBackTrace(array  $backtrace, string  $sourceClass = null) : string

Parse the Debug Backtrace into a String for the Error Report

Parameters

array $backtrace
string $sourceClass

Returns

string

shouldSkipTraceStep()

shouldSkipTraceStep(array  $traceStep) : boolean

Check if the given Trace Step should be skipped

Parameters

array $traceStep

Returns

boolean

isIgnoredSourceClass()

isIgnoredSourceClass(string  $class) : boolean

Check if the given Class Name should be ignored as possible Error Source Class

Parameters

string $class

Returns

boolean

parseArgumentsArray()

parseArgumentsArray(array  $args) : string

Build a string from an arguments array

Parameters

array $args

Returns

string

stripBaseDir()

stripBaseDir(string  $path) : string

Strip the ManiaControl path from the given path to ensure privacy

Parameters

string $path

Returns

string

getSourceClass()

getSourceClass(string  $errorFile) : string

Get the source class via the error file

Parameters

string $errorFile

Returns

string

shouldRestart()

shouldRestart() : boolean

Test if ManiaControl should restart automatically

Returns

boolean