Method
AggregateException::contains
Whether one of the failures is an instance of $class (subclasses and implementations included).
Description#
public AggregateException::contains(
string $class
): boolParameters#
- $class string
Return values#
bool
Examples#
if ($e->contains(PDOException::class)) {
$db->reconnect();
}See also#
AggregateException::getExceptionsReturns the failures, all of them or those of one class.