File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,25 @@ function boot( string $ConfigPath ) : Application
3434 $ Version = new Version ();
3535 $ Version ->loadFromFile ( "$ BasePath/.version.json " );
3636
37- return new Application ( $ Version ->getAsString (), $ Settings );
37+ try
38+ {
39+ $ App = new Application ( $ Version ->getAsString (), $ Settings );
40+ }
41+ catch ( \Exception $ e )
42+ {
43+ echo Application::beautifyException ( $ e );
44+ exit ( 1 );
45+ }
46+
47+ return $ App ;
3848}
3949
4050/**
4151 * Dispatches the current route mapped in the 'route' GET variable.
4252 *
4353 * @param Application $App
4454 */
55+
4556function dispatch ( Application $ App ) : void
4657{
4758 $ Route = Get::filterScalar ( 'route ' ) ?? "" ;
Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ public function clearExpiredCache(): int
480480 return 0 ;
481481 }
482482
483- public function beautifyException ( \Exception $ e ): string
483+ public static function beautifyException ( \Exception $ e ): string
484484 {
485485 // this function should return a nicely formatted HTML representation of the exception
486486 $ ExceptionType = get_class ( $ e );
You can’t perform that action at this time.
0 commit comments