ErrorHandling
in package
Table of Contents
Methods
- ignoring() : mixed
- Call a callback ignoring $flags warnings.
- throwingRuntimeException() : mixed
- Call a callback and throws a RuntimeException if a $flags warning is thrown.
Methods
ignoring()
Call a callback ignoring $flags warnings.
public
static ignoring(int $flags, callable $callback) : mixed
Parameters
- $flags : int
-
The flags to be ignored (eg E_WARNING | E_NOTICE)
- $callback : callable
-
The callable to be called
Tags
Return values
mixed —Returns the result of $callback
throwingRuntimeException()
Call a callback and throws a RuntimeException if a $flags warning is thrown.
public
static throwingRuntimeException(int $flags, callable $callback) : mixed
Parameters
- $flags : int
-
The flags to be intercepted (eg E_WARNING | E_NOTICE)
- $callback : callable
-
The callable to be called
Tags
Return values
mixed —Returns the result of $callback