From: Gunnar Wrobel Date: Fri, 5 Jun 2009 21:55:51 +0000 (+0200) Subject: If the location is not routable, log the error, notify the user and redirect to the... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=88e228262b239365851fdbd258e6353cad32fdba;p=horde.git If the location is not routable, log the error, notify the user and redirect to the application webroot. --- diff --git a/koward/www/htdocs/koward/koward.php b/koward/www/htdocs/koward/koward.php index c327063bd..556a2ef3f 100644 --- a/koward/www/htdocs/koward/koward.php +++ b/koward/www/htdocs/koward/koward.php @@ -16,7 +16,15 @@ Horde_Autoloader::addClassPattern('/^Koward_/', 'Koward/'); try { Koward::dispatch(__FILE__); } catch (Exception $e) { - // @TODO Make nicer - echo '

' . $e->getMessage() . '

'; - echo '
'; var_dump($e); echo '
'; + global $notification, $registry; + + Horde::logMessage($e->getMessage(), __FILE__, __LINE__, PEAR_LOG_DEBUG); + + if (isset($notification)) { + $notification->push($e->getMessage(), 'horde.error'); + } + + if (isset($registry)) { + header('Location: ' . $registry->get('webroot', 'koward')); + } }