lib/Model/Variant.php
public function setException(\Exception $exception)
    {
        $errors = [];

        do {
            $errors[] = Error::fromException($exception);
        } while ($exception = $exception->getPrevious());

        $this->errorStack = new ErrorStack($this, $errors);
    }
public function setException(\Exception $exception)
    {
        $errors = [];

        do {
            $errors[] = Error::fromException($exception);
        } while ($exception = $exception->getPrevious());

        $this->errorStack = new ErrorStack($this, $errors);
    }
public function setException ( \ Exception $ exception ) { $ errors = [ ] ; do { $ errors [ ] = Error :: fromException ( $ exception ) ; } while ( $ exception = $ exception -> getPrevious ( ) ) ; $ this -> errorStack = new ErrorStack ( $ this , $ errors ) ; }
Create an error stack from an Exception.

Should be called when an Exception is encountered during
the execution of any of the iteration processes.

After an exception is encountered the results from this iteration
set are invalid.

@param \Exception $exception
Create an error stack from an Exception .