Final Class Yiisoft\ErrorHandler\CompositeException
| Inheritance | Yiisoft\ |
|---|
Aggregate multiple exceptions into one.
Public Methods
Method Details
| public mixed __construct ( Throwable $first, Throwable $rest ) | ||
| $first | Throwable | |
| $rest | Throwable | |
public function __construct(
private readonly Throwable $first,
Throwable ...$rest,
) {
$this->rest = $rest;
parent::__construct($first->getMessage(), (int) $first->getCode(), $first);
}
| public Throwable getFirstException ( ) |
public function getFirstException(): Throwable
{
return $this->first;
}
| public Throwable[] getPreviousExceptions ( ) |
public function getPreviousExceptions(): array
{
return $this->rest;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.