From: Chuck Hagenbuch Date: Fri, 22 Oct 2010 02:03:32 +0000 (-0400) Subject: Use the NotFound controller instead of throwing a separate "not routable" exception X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cfd7a2c44bb853ec660511d6d4a6c54e294d9920;p=horde.git Use the NotFound controller instead of throwing a separate "not routable" exception --- diff --git a/framework/Core/lib/Horde/Core/Controller/RequestMapper.php b/framework/Core/lib/Horde/Core/Controller/RequestMapper.php index 990652328..69607693f 100644 --- a/framework/Core/lib/Horde/Core/Controller/RequestMapper.php +++ b/framework/Core/lib/Horde/Core/Controller/RequestMapper.php @@ -30,17 +30,18 @@ class Horde_Core_Controller_RequestMapper } else { list($app,) = explode('/', $uri, 2); } + $config->setApplication($app); // Check for route definitions. $fileroot = $registry->get('fileroot', $app); $routeFile = $fileroot . '/config/routes.php'; if (!file_exists($routeFile)) { - throw new Horde_Routes_Exception('Not routable: ' . $uri . '. ' . $routeFile . ' does not exist.'); + $config->setControllerName('Horde_Core_Controller_NotFound'); + return $config; } // Push $app onto the registry $registry->pushApp($app); - $config->setApplication($app); // Application routes are relative only to the application. Let the // mapper know where they start.