Merge pull request 'Adds when error gets called' (#7) from develop into master
All checks were successful
/ build (push) Successful in 35s

Reviewed-on: #7
This commit is contained in:
neintonine 2024-11-07 21:16:02 +00:00
commit 9e12deca4a

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);