From f5a4d7b2a3f0fb360f4a259458e32601dac736c3 Mon Sep 17 00:00:00 2001 From: Marcel Pokrandt Date: Wed, 21 Feb 2018 11:28:45 +0100 Subject: [PATCH] add message to Dispatch exceptions (#1376) Exceptions thrown while attempting to dispatch routes are now informing the exact value that was incorrect; url for not found routes and the method when the method was invalid. --- framework/core/src/Http/Middleware/DispatchRoute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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];