diff --git a/framework/core/src/Http/Middleware/DispatchRoute.php b/framework/core/src/Http/Middleware/DispatchRoute.php index 32498a84f..3ebb242c6 100644 --- a/framework/core/src/Http/Middleware/DispatchRoute.php +++ b/framework/core/src/Http/Middleware/DispatchRoute.php @@ -59,9 +59,9 @@ class DispatchRoute switch ($routeInfo[0]) { case Dispatcher::NOT_FOUND: - throw new RouteNotFoundException; + throw new RouteNotFoundException($uri); case Dispatcher::METHOD_NOT_ALLOWED: - throw new MethodNotAllowedException; + throw new MethodNotAllowedException($method); case Dispatcher::FOUND: $handler = $routeInfo[1]; $parameters = $routeInfo[2];