Improve fallback error handling

This commit is contained in:
Pierre Rudloff 2020-10-18 12:03:57 +02:00
parent 9becaeaabe
commit 07f19a80f4
2 changed files with 38 additions and 2 deletions

View file

@ -6,6 +6,7 @@ use Alltube\ConfigFactory;
use Alltube\Controller\DownloadController;
use Alltube\Controller\FrontController;
use Alltube\Controller\JsonController;
use Alltube\ErrorHandler;
use Alltube\LocaleManagerFactory;
use Alltube\LocaleMiddleware;
use Alltube\LoggerFactory;
@ -87,6 +88,5 @@ try {
$app->run();
} catch (Throwable $e) {
// Last resort if the error has not been caught by the error handler for some reason.
die('Error when starting the app: ' . htmlentities($e->getMessage()));
ErrorHandler::handle($e);
}