Bug #58773

Improve NoMatchingRouteException

Added by Bastian Waidelich about 1 year ago. Updated about 1 year ago.

Status:Accepted Start date:2014-05-13
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

0%

Category:MVC - Routing
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

Currently, when trying to create an URI but no matching route could be found, one only gets a very generic "Could not resolve a route and its corresponding URI for the given parameters." exception.
Because this exception is very common it should be improved so that the developer knows what to do about it.

58773_before.png (34.5 kB) Bastian Waidelich, 2014-05-13 15:59

58773_after.png (40.9 kB) Bastian Waidelich, 2014-05-13 15:59

History

#1 Updated by Bastian Waidelich about 1 year ago

I started on a basic solution that suggests a route configuration if its missing:
Before:

Afterwards:

Unfortunately this needs a tweaked DebugExceptionHandler that can render the exception details as preformatted text.. otherwise the route configuration is not readable

Also available in: Atom PDF