13 private $errorCollection;
15 private function getErrorQueueGenerator() : \Generator
17 $currentException = $this->exception;
21 $currentException->getMessage(),
22 $currentException->getCode()
25 while($currentException = $currentException->getPrevious());
35 $this->exception = $exception;
44 array_filter(iterator_to_array($this->getErrorQueueGenerator()))
53 return $this->exception->getCustomData();
63 return new self($exception);