49 return get_class($this->exception);
73 'message' => $message,
79 if (!ini_get(
'html_errors') || !ini_get(
'docref_root')) {
83 $pattern =
"/\[<a href='([^']+)'>(?:[^<]+)<\/a>\]/";
84 if (preg_match($pattern, $message, $matches)) {
86 $docref[
'message'] = preg_replace($pattern,
'', $message, 1);
87 $docref[
'url'] = $matches[1];
99 return $this->previousExceptionInspector || $this->exception->getPrevious();
109 if ($this->previousExceptionInspector === null) {
110 $previousException = $this->exception->getPrevious();
112 if ($previousException) {
113 $this->previousExceptionInspector =
new Inspector($previousException);
127 if ($this->frames === null) {
131 foreach (
$frames as $k => $frame) {
132 if (empty($frame[
'file'])) {
134 $file =
'[internal]';
140 $file = $next_frame[
'file'];
141 $line = $next_frame[
'line'];
151 foreach (
$frames as $k => $frame) {
152 if ($frame[
'file'] == $this->exception->getFile() && $frame[
'line'] == $this->exception->getLine()) {
163 array_unshift(
$frames, $firstFrame);
170 $newFrames = clone $previousInspector->getFrames();
172 if (isset($newFrames[0])) {
173 $newFrames[0]->addComment(
174 $previousInspector->getExceptionMessage(),
178 $newFrames->prependFrames($outerFrames->topDiff($newFrames));
179 $this->frames = $newFrames;
196 $traces = $e->getTrace();
207 if (!extension_loaded(
'xdebug') || !xdebug_is_enabled()) {
212 $stack = array_reverse(xdebug_get_function_stack());
213 $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
214 $traces = array_diff_key($stack, $trace);
246 'file' => $exception->getFile(),
247 'line' => $exception->getLine(),
262 if (empty($frame[
'file'])) {
266 if (empty($frame[
'line'])) {
270 if (empty($frame[
'function']) || !stristr($frame[
'function'],
'call_user_func')) {
getFrameFromException($exception)
Given an exception, generates an array in the format generated by Exception::getTrace() ...
isValidNextFrame(array $frame)
Determine if the frame can be used to fill in previous frame's missing info happens for call_user_fun...
extractDocrefUrl($message)
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.
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.
getExceptionDocrefUrl()
Returns a url to the php-manual related to the underlying error - when available. ...
$previousExceptionInspector
Whoops - php errors for cool kids.
Create styles array
The data for the language used.
getTrace($e)
Gets the backtrace from an exception.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Wraps ErrorException; mostly used for typing (at least now) to easily cleanup the stack trace of redu...
static isLevelFatal($level)
Determine if an error level is fatal (halts execution)