Feature #4704

Improve parsing exception messages

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

Status:New Start date:2009-09-20
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:Core
Target version:-
Has patch:

Description

Fluid Parsing Exceptions should contain the path and linenumber of the affected template for easier bug fixing.

4704_Improve_parsing_exception_messages.patch Magnifier (11.7 kB) Bastian Waidelich, 2009-09-20 16:47


Related issues

related to TYPO3.Fluid - Feature #9211: Improve ViewHelper exception handling Rejected 2010-08-09
related to TYPO3.Flow - Feature #37765: Display detailed informations within the "Could not resol... Resolved 2012-06-05
related to TYPO3.Fluid - Task #46091: Show source file name and position on exceptions during p... Needs Feedback 2013-03-07

History

#1 Updated by Bastian Waidelich almost 6 years ago

Attached is a very first version of a patch that includes template path, linenumber and current template extract to the exception messages of the template parser.
It still needs fine-tuning (e.g. the css styles should not be hardcoded in the error message of course), testing & probably better error handling.
Note: The "verbose" exception message is only active if \F3\Fluid\Fluid::$debugMode is TRUE
NoteĀ²: The patch has a sideeffect, it won't allow tags in view helper arguments. But I think, this should not be allowed anyways (and it makes Fluid slightly faster to skip those three regex lookups)

@anyone, please give feedback

#2 Updated by Bastian Waidelich about 5 years ago

  • Assigned To deleted (Bastian Waidelich)

#3 Updated by Bastian Waidelich about 5 years ago

  • Status changed from Needs Feedback to Accepted

We decided, that we need to decouple this feature from the core.
We want to implement a hook mechanism that allows us to intercept the parsing process and count line numbers etc.
This hook will only be active in a special verbose mode. In FLOW3 this mode will be activated in Development Context by default. in v4 this could be enabled through the Extension Manager or through the devIPMask setting for example.
This won't use the TYPO3 hook implementation as the TemplateParser is not part of the public API (and because we don't want to have any $GLOBALS in Fluid). But it would be possible to attach your own hooks by writing your own TemplateView class.

#4 Updated by Sebastian Kurfuerst about 4 years ago

  • Tracker changed from Task to Story

#5 Updated by Sebastian Kurfuerst about 4 years ago

  • Status changed from Accepted to New

#6 Updated by Sebastian Kurfuerst about 4 years ago

  • Tracker changed from Story to Feature

Also available in: Atom PDF