From cfd7a2c44bb853ec660511d6d4a6c54e294d9920 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 21 Oct 2010 22:03:32 -0400 Subject: [PATCH] Use the NotFound controller instead of throwing a separate "not routable" exception --- framework/Core/lib/Horde/Core/Controller/RequestMapper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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. -- 2.11.0