#1156: Improve error reporting in Genshi templates
-------------------------+--------------------------------------------------
 Reporter:  talin        |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:           
Component:  genshi       |      Version:  trunk    
 Severity:  minor        |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by talin):

 Ugh. I don't have the erroneous template any more. This error (and many
 others like it) occurred as I was trying to migrate my app's old Kid-based
 templates to Genshi, specifically where I was trying to remove the
 <?python> blocks that are no longer supported. So I have the old Kid-based
 ones, and the new Genshi based ones, both of which work, but I don't have
 the intermediate ones that produced this particular dump. But if I recall
 correctly, the eventual cause of this error turned out to be a bad 'dot'
 access inside a py:for loop - accessing a series of SQL object foreign
 keys from within a template, where the object being iterated was
 incorrectly set.

 One obsevation I had is that unlike normal template development where
 templates and expressions are built up incrementally, I was taking complex
 pre-existing templates and porting them over wholesale, and it felt like I
 was running into a different set of errors and exceptions than I would
 encounter in normal development, and these exceptions weren't being as
 robustly handled as the other.

 I didn't feel (at the time) that the specifics of the error itself were
 important - the main point is, that while most template errors were
 getting caught by Genshi and reported as template errors (with annotations
 as to line number and template name), a few errors were slipping through
 and propagating all the way to the top, with no annotation information. In
 this particular case, it took me a while to even determine which template
 source file was the cause of the error, let alone what line number.

 I'm sorry I don't have more detail - I might be able to reproduce a
 similar situation if you need it. (I suppose you do - otherwise, there's
 no way to validate the closing of this bug.)

 The version of Genshi was obtained by checking out the TG trunk from svn,
 and then doing an "easy_install ." (I did have to install TurboJson
 manually however.)

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/1156>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to