aboutsummaryrefslogtreecommitdiffstats
path: root/404.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-14 20:03:19 +0200
committerThomas Lange <code@nerdmind.de>2021-06-14 20:03:19 +0200
commit78fcc20190121d487a2e6cf1fca53b66df67dc3a (patch)
treeb9b0dc3da8afc923fbac80ade147305cb7079e3f /404.php
parentd453ba414803832bb4e4f9ae5eddec7ae3f60205 (diff)
downloadblog-78fcc20190121d487a2e6cf1fca53b66df67dc3a.tar.gz
blog-78fcc20190121d487a2e6cf1fca53b66df67dc3a.tar.xz
blog-78fcc20190121d487a2e6cf1fca53b66df67dc3a.zip
Remove more redundant try/catch blocks
Remove all try/catch blocks where the exception handling did not differ from the exception handler already defined by "set_exception_handler".
Diffstat (limited to '404.php')
-rw-r--r--404.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/404.php b/404.php
index 544246d..0fdf419 100644
--- a/404.php
+++ b/404.php
@@ -9,21 +9,9 @@ require_once 'core/application.php';
#===============================================================================
http_response_code(404);
-#===============================================================================
-# TRY: Template\Exception
-#===============================================================================
-try {
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', '404 Not Found');
- $MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
- $MainTemplate->set('HTML', Template\Factory::build('404'));
-
- echo $MainTemplate;
-}
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', '404 Not Found');
+$MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
+$MainTemplate->set('HTML', Template\Factory::build('404'));
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
+echo $MainTemplate;