Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
format_exception fails if exception occured in child template of inheritance chain #71
Migrated issue, originally created by Anonymous
Very strange behavior, but:
As a result there will be 3 blank lines :). Expected: formatted error message.
Representable with 0.1.10 and latest trunk.
Problem is in your way of copying context. After Context._copy() copied instance will share all buffers and even buffer list with source Context. This can make a lot of hard-to-find errors. As this :).
mako.runtime, _exec_template(), 332 line:
Here you overwrite buffer stack, but only for current context instance. And expect changes on all Contexts :).
In patch I had also changed the way buffers are created. At least this will allow multilingual template errors messages in the future ;). Also - use cStringIO ONLY for unicode (I mean use cStringIO if non-unicode encoding supplied).
If you dont want that much changes - to fix error problem you just need to replace
Michael Bayer (@zzzeek) wrote:
OK, sorry we can't change the constructor to