Adds when error gets called

This commit is contained in:
Michel 2024-11-07 22:15:30 +01:00
parent 26e11b5a51
commit be80b75692

View file

@ -37,6 +37,11 @@ final class CrashHandler
return new CallbackHandler(
function (Throwable $exception, InspectorInterface $inspector, RunInterface $run) {
ContainerHandler::get(Logger::class)
->emergency(
"Unexpected exception occurred: {$exception->getMessage()} at line {$exception->getLine()} in {$exception->getFile()}",
);
http_response_code(500);
echo ContainerHandler::get(TemplateEngine::class)
->renderErrorPage(500);