From 78fcc20190121d487a2e6cf1fca53b66df67dc3a Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 14 Jun 2021 20:03:19 +0200 Subject: 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". --- 404.php | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to '404.php') 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; -- cgit v1.2.3