Adds when error gets called #7

Merged
neintonine merged 1 commit from develop into master 2024-11-07 21:16:02 +00:00

View file

@ -37,6 +37,11 @@ final class CrashHandler
return new CallbackHandler( return new CallbackHandler(
function (Throwable $exception, InspectorInterface $inspector, RunInterface $run) { 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); http_response_code(500);
echo ContainerHandler::get(TemplateEngine::class) echo ContainerHandler::get(TemplateEngine::class)
->renderErrorPage(500); ->renderErrorPage(500);