ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Whoops\Exception\Formatter Class Reference
+ Collaboration diagram for Whoops\Exception\Formatter:

Static Public Member Functions

static formatExceptionPlain (Inspector $inspector)
 

Detailed Description

Member Function Documentation

◆ formatExceptionPlain()

static Whoops\Exception\Formatter::formatExceptionPlain ( Inspector  $inspector)
static
Examples
/usr/local/src/ilias/release_5-1/Services/Exceptions/lib/Whoops/Handler/PrettyPageHandler.php.

Definition at line 50 of file Formatter.php.

51 {
52 $message = $inspector->getException()->getMessage();
53 $frames = $inspector->getFrames();
54
55 $plain = $inspector->getExceptionName();
56 $plain .= ' thrown with message "';
57 $plain .= $message;
58 $plain .= '"'."\n\n";
59
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() ?: '';
66 $plain .= ' in ';
67 $plain .= ($frame->getFile() ?: '<#unknown>');
68 $plain .= ':';
69 $plain .= (int) $frame->getLine(). "\n";
70 }
71
72 return $plain;
73 }
getFrames()
Returns an iterator for the inspected exception's frames.
Definition: Inspector.php:92

References Whoops\Exception\Inspector\getException(), Whoops\Exception\Inspector\getExceptionName(), and Whoops\Exception\Inspector\getFrames().

Referenced by Whoops\Handler\PrettyPageHandler\handle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: