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