phasync
AggregateException / contains

Method

AggregateException::contains

Whether one of the failures is an instance of $class (subclasses and implementations included).

Description#

public AggregateException::contains(
    string $class
): bool

Parameters#

$class string

Return values#

bool

Examples#

Example 1
if ($e->contains(PDOException::class)) {
    $db->reconnect();
}

See also#