Jyxo\Exception::getAllPrevious PHP Method

getAllPrevious() public method

Returns all previous exceptions in an array.
public getAllPrevious ( ) : array
return array
    public function getAllPrevious() : array
    {
        $stack = [];
        $previous = $this->getPrevious();
        while (null !== $previous) {
            $stack[] = $previous;
            $previous = $previous->getPrevious();
        }
        return $stack;
    }