[TASK] Add proper exception handling to RouterInterface logic 19/58519/3
authorBenni Mack <benni@typo3.org>
Mon, 1 Oct 2018 10:42:06 +0000 (12:42 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 1 Oct 2018 13:39:27 +0000 (15:39 +0200)
commitad30de1a39083396ba41ebd1e193f6aa712f85d7
tree7360c9975e6265d8ba93a66309cf8aed68ba3120
parent9ba04641f57acebf0fd93bdd88abb75dc8f8afd2
[TASK] Add proper exception handling to RouterInterface logic

Two new Exceptions are now thrown when routing does not
work, one being thrown when a URL is generated but could
not be generated, and one when a URL could not be resolved.

This is much cleaner than the distinction of a nullable return type,
so the new interface is adapted as well.

As a drive-by fix, the Backend routing exception now inherits from
this new exception.

Resolves: #86500
Releases: master
Change-Id: Ifaf7b61422dfd49df18399c3bcbdf735bc522cba
Reviewed-on: https://review.typo3.org/58519
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Routing/Exception/RouteNotFoundException.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/Routing/InvalidRouteArgumentsException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Routing/PageRouter.php
typo3/sysext/core/Classes/Routing/RouteNotFoundException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Routing/RouterInterface.php
typo3/sysext/core/Classes/Routing/SiteMatcher.php
typo3/sysext/frontend/Classes/Middleware/PageResolver.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php