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". --- 403.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to '403.php') diff --git a/403.php b/403.php index 4fbe789..82f6836 100644 --- a/403.php +++ b/403.php @@ -10,20 +10,11 @@ require_once 'core/application.php'; http_response_code(403); #=============================================================================== -# TRY: Template\Exception +# Build document #=============================================================================== -try { - $MainTemplate = Template\Factory::build('main'); - $MainTemplate->set('NAME', '403 Forbidden'); - $MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]); - $MainTemplate->set('HTML', Template\Factory::build('403')); +$MainTemplate = Template\Factory::build('main'); +$MainTemplate->set('NAME', '403 Forbidden'); +$MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]); +$MainTemplate->set('HTML', Template\Factory::build('403')); - echo $MainTemplate; -} - -#=============================================================================== -# CATCH: Template\Exception -#=============================================================================== -catch(Template\Exception $Exception) { - Application::exit($Exception->getMessage()); -} +echo $MainTemplate; -- cgit v1.2.3