diff --git a/controller/Controller.php b/controller/Controller.php index 7628c2b..9abdf87 100644 --- a/controller/Controller.php +++ b/controller/Controller.php @@ -47,7 +47,11 @@ Class Controller { ob_end_flush(); }else { - throw new Exception("Layout file not exist: {$layoutFile}", 500); + $error_message = "Layout file {$this->layout}.php is not exist."; + if (!empty(FSC::$app['config']['theme'])) { + $error_message = "Layout file {$this->layout}.php in theme " . FSC::$app['config']['theme'] . " is not exist."; + } + throw new Exception($error_message, 500); } } diff --git a/lib/FSC.php b/lib/FSC.php index 09aaf9d..294b290 100644 --- a/lib/FSC.php +++ b/lib/FSC.php @@ -98,9 +98,9 @@ Class FSC { throw new Exception($error_message, 500); } }else { - $error_message = "Controller {$className} not exist."; + $error_message = "Controller {$className}.php not exist."; if (!empty($config['theme'])) { - $error_message = "Controller {$className} not exist in theme {$config['theme']}."; + $error_message = "Controller {$className}.php not exist in theme {$config['theme']}."; } throw new Exception($error_message, 500); }