HumHub Documentation (unofficial)

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
throws
Exception

Throws an Exception if $callback throws an Exception

throws
Throwable

Throws an Throwable if $callback throws an Throwable

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
throws
RuntimeException
throws
RuntimeException
throws
Exception
throws
Throwable
Return values
mixed

Returns the result of $callback


        
On this page

Search results