Feature #30777

Catch Routing Exceptions in uri and link ViewHelpers

Added by Bastian Waidelich almost 4 years ago. Updated about 3 years ago.

Status:Resolved Start date:2011-10-11
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:ViewHelpers
Target version:TYPO3 Flow Base Distribution - 1.0.0
Has patch:No

Description

Developers having a hard time figuring out what went wrong, if FLOW3 dies with a Routing Exception. Especially when you have a template that contains an invalid link.* or uri.* view helper, the exception "Could not resolve a route...." is very misleading.

I'd suggest to catch Routing Exceptions in the respective ViewHelpers and turn them into ViewHelper Exceptions. That way we can output a more meaningful error message (when we have a proper Fluid debug mode, the faulty template line will be outputted in dev context).

BTW: We might also do this for ActionController::redirect()


Related issues

related to TYPO3.Flow - Feature #37765: Display detailed informations within the "Could not resol... Resolved 2012-06-05

Associated revisions

Revision 24a8e237
Added by Bastian Waidelich almost 4 years ago

[FEATURE] Catch Routing Exceptions in uri and link ViewHelpers

This change makes sure that exceptions that are thrown by the
router are caught and rethrown as ViewHelper exceptions in all
ViewHelpers that make use of the UriBuilder.
This makes it easier for developers to debug their templates
(see #30777).

Change-Id: Ie34ef79049b2160334c331a1b83031e80430e5ee
Resolves: #30777

History

#1 Updated by Mr. Hudson almost 4 years ago

Patch set 1 of change Ie34ef79049b2160334c331a1b83031e80430e5ee has been pushed to the review server.
It is available at http://review.typo3.org/5797

#2 Updated by Bastian Waidelich almost 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Karsten Dambekalns almost 4 years ago

  • Target version changed from 1230 to 1.0.0

Also available in: Atom PDF