summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-17 10:59:07 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-17 10:59:07 -0400
commit3543f45c2d4d6e96e5b88c3168075c0d583fc261 (patch)
tree7f56a1193dacb072d4955f29e9bb1111f6896117 /index.php
parent8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec (diff)
Throw exception for page not found
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 5 insertions, 1 deletions
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();
+}