diff options
author | Thomas Lange <code@nerdmind.de> | 2021-06-14 20:03:19 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-06-14 20:03:19 +0200 |
commit | 78fcc20190121d487a2e6cf1fca53b66df67dc3a (patch) | |
tree | b9b0dc3da8afc923fbac80ade147305cb7079e3f /403.php | |
parent | d453ba414803832bb4e4f9ae5eddec7ae3f60205 (diff) | |
download | blog-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 '403.php')
-rw-r--r-- | 403.php | 21 |
1 files changed, 6 insertions, 15 deletions
@@ -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; |