diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 622339e..e22bf86 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -977,9 +977,6 @@ function menu_item_route_access(Route $route, $href, &$map) { catch (NotFoundHttpException $e) { return FALSE; } - catch (ResourceNotFoundException $e) { - throw new ResourceNotFoundException(String::format("The route for '@href' could not be found", array('@href' => $href))); - } // Populate the map with any matching values from the request. $path_bits = explode('/', trim($route->getPath(), '/')); diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php index 752cf56..24ad5ff 100644 --- a/core/lib/Drupal/Core/Routing/RouteProvider.php +++ b/core/lib/Drupal/Core/Routing/RouteProvider.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Routing; +use Drupal\Component\Utility\String; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Exception\RouteNotFoundException; use Symfony\Component\Routing\RouteCollection; @@ -99,7 +100,7 @@ public function getRouteCollectionForRequest(Request $request) { $collection = $this->getRoutesByPath($path); if (!count($collection)) { - throw new ResourceNotFoundException(); + throw new ResourceNotFoundException(String::format("The route for '@path' could not be found", array('@path' => $path))); } return $collection;