function PEAR_Exception::toText
Generates text representation of the exception and stack trace
Return value
string
1 call to PEAR_Exception::toText()
- PEAR_Exception::__toString in vendor/
pear/ pear_exception/ PEAR/ Exception.php - Converts the exception to a string (HTML or plain text)
File
-
vendor/
pear/ pear_exception/ PEAR/ Exception.php, line 443
Class
- PEAR_Exception
- Base PEAR_Exception Class
Code
public function toText() {
$causes = array();
$this->getCauseMessage($causes);
$causeMsg = '';
foreach ($causes as $i => $cause) {
$causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' . $cause['message'] . ' in ' . $cause['file'] . ' on line ' . $cause['line'] . "\n";
}
return $causeMsg . $this->getTraceAsString();
}