19 public static function formatExceptionAsDataArray(
Inspector $inspector, $shouldAddTrace)
23 'type' => get_class($exception),
24 'message' => $exception->getMessage(),
25 'file' => $exception->getFile(),
26 'line' => $exception->getLine(),
29 if ($shouldAddTrace) {
33 foreach ($frames as $frame) {
36 'file' => $frame->getFile(),
37 'line' => $frame->getLine(),
38 'function' => $frame->getFunction(),
39 'class' => $frame->getClass(),
40 'args' => $frame->getArgs(),
44 $response[
'trace'] = $frameData;
56 $plain .=
' thrown with message "';
60 $plain .=
"Stacktrace:\n";
61 foreach ($frames as $i => $frame) {
62 $plain .=
"#". (count($frames) - $i - 1).
" ";
63 $plain .= $frame->getClass() ?:
'';
64 $plain .= $frame->getClass() && $frame->getFunction() ?
":" :
"";
65 $plain .= $frame->getFunction() ?:
'';
67 $plain .= ($frame->getFile() ?:
'<#unknown>');
69 $plain .= (int) $frame->getLine().
"\n";
getFrames()
Returns an iterator for the inspected exception's frames.
Whoops - php errors for cool kids.