class ErrorHandling

Methods

static mixed
ignoring(int $flags, callable $callback)

Call a callback ignoring $flags warnings.

static mixed
throwingRuntimeException(int $flags, callable $callback)

Call a callback and throws a RuntimeException if a $flags warning is thrown.

Details

at line 32
static mixed ignoring(int $flags, callable $callback)

Call a callback ignoring $flags warnings.

Parameters

int $flags The flags to be ignored (eg E_WARNING | E_NOTICE)
callable $callback The callable to be called

Return Value

mixed Returns the result of $callback

Exceptions

Exception Throws an Exception if $callback throws an Exception
Throwable Throws an Throwable if $callback throws an Throwable

at line 68
static mixed throwingRuntimeException(int $flags, callable $callback)

Call a callback and throws a RuntimeException if a $flags warning is thrown.

Parameters

int $flags The flags to be intercepted (eg E_WARNING | E_NOTICE)
callable $callback The callable to be called

Return Value

mixed Returns the result of $callback

Exceptions

RuntimeException
RuntimeException
Exception
Throwable