Documentation

PHPUnit_Util_ErrorHandler
in package

Error handler that converts PHP errors and warnings to exceptions.

Tags
since

Class available since Release 3.3.0

Table of Contents

$errorStack  : mixed
getErrorStack()  : array<string|int, mixed>
Returns the error stack.
handleError()  : mixed
handleErrorOnce()  : mixed
Registers an error handler and returns a function that will restore the previous handler when invoked

Properties

$errorStack

protected static mixed $errorStack = array()

Methods

getErrorStack()

Returns the error stack.

public static getErrorStack() : array<string|int, mixed>
Return values
array<string|int, mixed>

handleError()

public static handleError(int $errno, string $errstr, string $errfile, int $errline) : mixed
Parameters
$errno : int
$errstr : string
$errfile : string
$errline : int
Tags
throws
PHPUnit_Framework_Error
Return values
mixed

handleErrorOnce()

Registers an error handler and returns a function that will restore the previous handler when invoked

public static handleErrorOnce([int $severity = E_WARNING ]) : mixed
Parameters
$severity : int = E_WARNING

PHP predefined error constant

Tags
throws
Exception

if event of specified severity is emitted

Return values
mixed

Search results