From 1a050c087e8f2889b421992350c50fae75a9252b Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Fri, 27 Mar 2015 14:21:34 +0100 Subject: error handling --- index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index a00efc3..b4c87ad 100644 --- a/index.php +++ b/index.php @@ -32,8 +32,8 @@ $tpl->set(array( )); +ob_start(); try { - if($route == '') { include('view/overview.php'); @@ -135,10 +135,11 @@ try { } catch(NotFoundException $e) { + ob_clean(); include('view/404.php'); } catch(Exception $e) { - header("HTTP/1.1 500 Internal Server Error"); - die($e); + ob_clean(); + include('view/500.php'); } -- cgit v1.2.3