1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 05:30:38 +02:00

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.
This commit is contained in:
Marcel Pokrandt
2018-02-21 11:28:45 +01:00
committed by Daniël Klabbers
parent 0b478379fc
commit 0f554585ac

View File

@@ -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];