File tree Expand file tree Collapse file tree 5 files changed +24
-4
lines changed
Expand file tree Collapse file tree 5 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 22 "strategy" : " semver" ,
33 "major" : 0 ,
44 "minor" : 8 ,
5- "patch" : 3 ,
5+ "patch" : 4 ,
66 "build" : 0
77}
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 );
Original file line number Diff line number Diff line change @@ -41,7 +41,14 @@ public function render( array $Data ): string
4141 $ Path = "$ BasePath/resources/views " ;
4242 }
4343
44- $ ControllerName = new NString ( $ this ->getController () )->toSnakeCase ();
44+ // Convert controller name to snake_case, preserving directory separators
45+ $ controllerParts = explode ( '/ ' , $ this ->getController () );
46+ $ snakeCaseParts = array_map (
47+ fn ( $ part ) => ( new NString ( $ part ) )->toSnakeCase (),
48+ $ controllerParts
49+ );
50+ $ ControllerName = implode ( '/ ' , $ snakeCaseParts );
51+
4552 $ View = "$ Path/ $ ControllerName/ {$ this ->getPage ()}.php " ;
4653
4754 if ( !file_exists ( $ View ) )
Original file line number Diff line number Diff line change 1+ ## 0.8.4 2025-11-07
2+
13## 0.8.3 2025-11-07
24
35* Added exception formatting.
You can’t perform that action at this time.
0 commit comments