49 return get_class($this->exception);
57 return $this->exception->getMessage();
66 return $this->previousExceptionInspector || $this->exception->getPrevious();
76 if ($this->previousExceptionInspector === null) {
77 $previousException = $this->exception->getPrevious();
79 if ($previousException) {
80 $this->previousExceptionInspector =
new Inspector($previousException);
94 if ($this->frames === null) {
95 $frames = $this->exception->getTrace();
105 array_unshift(
$frames, $firstFrame);
112 $newFrames = clone $previousInspector->getFrames();
114 if (isset($newFrames[0])) {
115 $newFrames[0]->addComment(
116 $previousInspector->getExceptionMessage(),
120 $newFrames->prependFrames($outerFrames->topDiff($newFrames));
121 $this->frames = $newFrames;
137 'file' => $exception->getFile(),
138 'line' => $exception->getLine(),
139 'class' => get_class($exception),
141 $exception->getMessage(),
155 'file' => $exception->getFile(),
156 'line' => $exception->getLine(),
getPreviousExceptionInspector()
Returns an Inspector for a previous Exception, if any.
getFrameFromError(ErrorException $exception)
Given an error, generates an array in the format generated by ErrorException.
getFrameFromException(Exception $exception)
Given an exception, generates an array in the format generated by Exception::getTrace() ...
getFrames()
Returns an iterator for the inspected exception's frames.
hasPreviousException()
Does the wrapped Exception has a previous Exception?
Exposes a fluent interface for dealing with an ordered list of stack-trace frames.
$previousExceptionInspector
Whoops - php errors for cool kids.
__construct(Exception $exception)
Wraps ErrorException; mostly used for typing (at least now) to easily cleanup the stack trace of redu...