0 follower

Final Class Yiisoft\ErrorHandler\CompositeException

InheritanceYiisoft\ErrorHandler\CompositeException » Exception

Aggregate multiple exceptions into one.

Method Details

Hide inherited methods

__construct() public method

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);
}

            
getFirstException() public method

public Throwable getFirstException ( )

                public function getFirstException(): Throwable
{
    return $this->first;
}

            
getPreviousExceptions() public method

public Throwable[] getPreviousExceptions ( )

                public function getPreviousExceptions(): array
{
    return $this->rest;
}