static function getChain(\Throwable $node): array
    {
        $chain = [];
        $hashMap = [];

        while ($node !== null && !isset($hashMap[$hash = spl_object_hash($node)])) {
            $chain[] = $node;
            $hashMap[$hash] = true;
            $node = $node->getPrevious();
        }

        return $chain;
    }
static function getChain(\Throwable $node): array
    {
        $chain = [];
        $hashMap = [];

        while ($node !== null && !isset($hashMap[$hash = spl_object_hash($node)])) {
            $chain[] = $node;
            $hashMap[$hash] = true;
            $node = $node->getPrevious();
        }

        return $chain;
    }
static function getChain ( \ Throwable $ node ) : array { $ chain = [ ] ; $ hashMap = [ ] ; while ( $ node !== null && ! isset ( $ hashMap [ $ hash = spl_object_hash ( $ node ) ] ) ) { $ chain [ ] = $ node ; $ hashMap [ $ hash ] = true ; $ node = $ node -> getPrevious ( ) ; } return $ chain ; }
List exceptions starting from the given exception

@return \Throwable[]
List exceptions starting from the given exception