From 3543f45c2d4d6e96e5b88c3168075c0d583fc261 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Oct 2015 10:59:07 -0400 Subject: Throw exception for page not found --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 2f44b746..90a4c464 100644 --- a/index.php +++ b/index.php @@ -2,4 +2,8 @@ require __DIR__.'/app/common.php'; -$container['router']->dispatch($_SERVER['REQUEST_URI'], isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''); +try { + $container['router']->dispatch($_SERVER['REQUEST_URI'], isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''); +} catch (Exception $e) { + echo 'Internal Error: '.$e->getMessage(); +} -- cgit v1.2.3