mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 06:53:47 +08: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:
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];
|
||||
|
|
Loading…
Reference in New Issue
Block a user