Method
AggregateException::getExceptions
Returns the failures, all of them or those of one class.
Description#
public AggregateException::getExceptions(
?string $class = null
): arrayParameters#
- $class ?string = null
- Only the failures that are instances of it (subclasses and implementations included)
Return values#
In order: $fn's first, then the others as they happened array
Examples#
foreach ($e->getExceptions(PDOException::class) as $failure) {
$logger->critical($failure->getMessage());
}See also#
AggregateException::containsWhether one of the failures is an instance of$class(subclasses and implementations included).