class ErrorManager (View source)

The ErrorManager class.

Methods

__construct(WebApplication $app)

ErrorManager constructor.

void
down()

down

void
error(integer $code, string $message, string $file, integer $line, mixed $context = null)

The error handler.

void
exception(Throwable|Exception $exception)

The exception handler.

string
getErrorTemplate()

Method to get property ErrorTemplate

void
setErrorTemplate(string $errorTemplate)

Method to set property errorTemplate

string
getLevelName(integer $constant)

getLevelName

integer|false
getLevelCode(string $name)

getLevelCode

register(bool $restore = true, int $type = E_ALL | E_STRICT, bool $shutdown = false)

registerErrorHandler

void
restore()

restore

addHandler(callable $handler, string $name = null)

Method to set property handler

removeHandler(string $name)

removeHandler

callable[]
getHandlers()

Method to get property Handlers

setHandlers(callable[] $handlers)

Method to set property handlers

Details

at line line 70
__construct(WebApplication $app)

ErrorManager constructor.

Parameters

WebApplication $app

at line line 82
void down()

down

Return Value

void

at line line 106
void error(integer $code, string $message, string $file, integer $line, mixed $context = null)

The error handler.

Parameters

integer $code The level of the error raised, as an integer.
string $message The error message, as a string.
string $file The filename that the error was raised in, as a string.
integer $line The line number the error was raised at, as an integer.
mixed $context An array that contains variables in the scope which this error occurred.

Return Value

void

Exceptions

ErrorException

See also

http://php.net/manual/en/function.set-error-handler.php

at line line 138
void exception(Throwable|Exception $exception)

The exception handler.

Parameters

Throwable|Exception $exception The exception object.

Return Value

void

at line line 200
string getErrorTemplate()

Method to get property ErrorTemplate

Return Value

string

at line line 212
void setErrorTemplate(string $errorTemplate)

Method to set property errorTemplate

Parameters

string $errorTemplate

Return Value

void

at line line 229
string getLevelName(integer $constant)

getLevelName

Parameters

integer $constant

Return Value

string

at line line 246
integer|false getLevelCode(string $name)

getLevelCode

Parameters

string $name

Return Value

integer|false

at line line 260
register(bool $restore = true, int $type = E_ALL | E_STRICT, bool $shutdown = false)

registerErrorHandler

Parameters

bool $restore
int $type
bool $shutdown

at line line 286
void restore()

restore

Return Value

void

at line line 300
ErrorManager addHandler(callable $handler, string $name = null)

Method to set property handler

Parameters

callable $handler
string $name

Return Value

ErrorManager Return self to support chaining.

at line line 321
ErrorManager removeHandler(string $name)

removeHandler

Parameters

string $name

Return Value

ErrorManager

at line line 333
callable[] getHandlers()

Method to get property Handlers

Return Value

callable[]

at line line 345
ErrorManager setHandlers(callable[] $handlers)

Method to set property handlers

Parameters

callable[] $handlers

Return Value

ErrorManager Return self to support chaining.