Re: Error reporting info in compiled templates
Monte Ohrt <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
Can you give a specific example of how this would work and what this would accomplish? Thanks Monte Daniel BODEA wrote: >Greetings, > >We are using Smarty in a system that needs a little more than a simple >template engine and the plug-ins system is the one that allows for that. We >basically provide plug-ins for data retrieval inside the templates and let >designers organize their templates the way they see fit and put in the >content of their choice. > >What I believe is missing from Smarty right now though (that is if I'm not >mistaken), is the debugging info inside the compiled templates that we'd use >for instance to report exact errors to the designers. A data retrieval >plug-in that needs to report an error to the designer can currently either >use Smarty's trigger_error method that doesn't tell the designer much or >play around with backtraces and Smarty private variables to try to figure >out the template name, the line number and the plug-in name that the >designer needs to track down the problem, and all this time hoping that you >don't stumble upon PHP bugs in backtraces and the like. Needless to say this >solution is neither scalable nor does it guarantee consistency with future >versions of Smarty. > >The solution would be to track debug info in compiled templates either as >PHP statements that fill in variables or as PHP comments with special >prefixes that don't add any more processing weight to the templates and can >be easily searched for in case error reporting is needed. > >This is just the incentive of the idea but I'd first like to know if such a >system already exists or if anyone is already working on something related >and also if the project's coordinators would be interested in such a thing. > >Daniel > > > -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php