mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +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:
committed by
Daniël Klabbers
parent
7bfb220979
commit
f5a4d7b2a3
@@ -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];
|
||||
|
Reference in New Issue
Block a user