The application could not run because of the following error:
';
$html .= 'Details
';
$html .= $this->renderExceptionFragment($exception);
} else {
$html = "{$exception->getMessage()}
{$this->getErrorDescription($exception)}
";
}
return $this->renderHtmlBody($this->getErrorTitle($exception), $html);
}
/**
* @param Throwable $exception
* @return string
*/
private function renderExceptionFragment(Throwable $exception): string
{
$html = sprintf('Type: %s
', get_class($exception));
$code = $exception->getCode();
if ($code !== null) {
$html .= sprintf('Code: %s
', $code);
}
$message = $exception->getMessage();
if ($message !== null) {
$html .= sprintf('Message: %s
', htmlentities($message));
}
$file = $exception->getFile();
if ($file !== null) {
$html .= sprintf('File: %s
', $file);
}
$line = $exception->getLine();
if ($line !== null) {
$html .= sprintf('Line: %s
', $line);
}
$trace = $exception->getTraceAsString();
if ($trace !== null) {
$html .= 'Trace
';
$html .= sprintf('%s
', htmlentities($trace));
}
return $html;
}
/**
* @param string $title
* @param string $html
* @return string
*/
public function renderHtmlBody(string $title = '', string $html = ''): string
{
return sprintf(
<<
%s
%s
%s
HTML,
$title,
$title,
$html
);
}
}