function FlattenException::getAsString
File
-
vendor/
symfony/ error-handler/ Exception/ FlattenException.php, line 413
Class
- FlattenException
- FlattenException wraps a PHP Error or Exception to be able to serialize it.
Namespace
Symfony\Component\ErrorHandler\ExceptionCode
public function getAsString() : string {
if (null !== $this->asString) {
return $this->asString;
}
$message = '';
$next = false;
foreach (array_reverse(array_merge([
$this,
], $this->getAllPrevious())) as $exception) {
if ($next) {
$message .= 'Next ';
}
else {
$next = true;
}
$message .= $exception->getClass();
if ('' != $exception->getMessage()) {
$message .= ': ' . $exception->getMessage();
}
$message .= ' in ' . $exception->getFile() . ':' . $exception->getLine() . "\nStack trace:\n" . $exception->getTraceAsString() . "\n\n";
}
return rtrim($message);
}