Documentation

ErrorHandlerBase
in package

Class for error handling

Table of Contents

$ajax  : bool
$back  : string
$debug  : bool
$devel  : bool
$errignore  : bool
$error  : bool
$local  : Local
$senterrors  : array<, mixed>
$wasignored  : bool
$tellfields  : mixed
__construct()  : mixed
Constructor
eIgnore()  : bool
Allow system to ignore errors
enableDebug()  : void
Put the system into debugging mode
eRewrite()  : string
Rewrite error string
make500()  : void
Generate a 500 and possibly an error page
tellAdmin()  : string
Tell sysadmin there was an error

Properties

$back

protected string $back = ''

Backtrace info - only used with errors

$errignore

protected bool $errignore = FALSE

If TRUE then ignore trapped errors

$error

protected bool $error = FALSE

If TRUE then we are handling an error

$senterrors

protected array<, mixed> $senterrors = []

A list of errors that have been emailed to the user. Only send a message once.

$wasignored

protected bool $wasignored = FALSE

Set to TRUE if an error was trapped and ignored

$tellfields

private static mixed $tellfields = ['REQUEST_URI', 'HTTP_REFERER', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', 'REQUEST_METHOD', 'REQUEST_SCHEME', 'QUERY_STRING', 'HTTP_COOKIE', 'HTTP_USER_AGENT']

Methods

__construct()

Constructor

public __construct(bool $devel, bool $ajax, Local $local) : mixed
Parameters
$devel : bool
$ajax : bool
$local : Local
Return values
mixed

eIgnore()

Allow system to ignore errors

public eIgnore(bool $ignore) : bool

This always clears the wasignored flag

Parameters
$ignore : bool

If TRUE then ignore the error otherwise stop ignoring

Return values
bool

The last value of the wasignored flag

enableDebug()

Put the system into debugging mode

public enableDebug() : void
Tags
psalm-suppress

PossiblyNullReference

Return values
void

eRewrite()

Rewrite error string

protected eRewrite([string $origin = '' ]) : string
Parameters
$origin : string = ''

HTTP details

Return values
string

make500()

Generate a 500 and possibly an error page

protected make500( $ekey) : void
Parameters
$ekey :
Error information string
Return values
void

tellAdmin()

Tell sysadmin there was an error

protected tellAdmin(string $msg,  $type, string $file, int $line) : string
Parameters
$msg : string

An error messager

$type :

An error type

$file : string

file in which error happened

$line : int

Line at which it happened

Return values
string

Search results