Пример #1
0
 /**
  * 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 $e
  */
 public function setException(\Exception $exception)
 {
     $errors = [];
     do {
         $errors[] = Error::fromException($exception);
     } while ($exception = $exception->getPrevious());
     $this->errorStack = new ErrorStack($this, $errors);
 }