From a35a50eb53c1b157943861967a58916200a8a7ad Mon Sep 17 00:00:00 2001 From: User Date: Fri, 12 Apr 2024 03:24:10 +0300 Subject: [PATCH] 20240412#2 --- src/Main/Controllers/IndexController.php | 11 ++++------- templates/{main => error}/errpage.tpl | 0 2 files changed, 4 insertions(+), 7 deletions(-) rename templates/{main => error}/errpage.tpl (100%) diff --git a/src/Main/Controllers/IndexController.php b/src/Main/Controllers/IndexController.php index e6b387c..9b231df 100644 --- a/src/Main/Controllers/IndexController.php +++ b/src/Main/Controllers/IndexController.php @@ -1,12 +1,11 @@ template()->setSubtemplate("main", "/main/index.tpl", [ "date" => (new \DateTime())->format('Y-m-d H:i:s') ]); - return $this->render(); } - catch(ServiceException $exception){} - return true; + catch(\Throwable $e){$error = $this->checkError($e);} + return $this->render(); } - } \ No newline at end of file diff --git a/templates/main/errpage.tpl b/templates/error/errpage.tpl similarity index 100% rename from templates/main/errpage.tpl rename to templates/error/errpage.tpl