Something related I was wondering about...

Errors in templates should be silenced -- I agree with that -- but
only when they are caused by an error in the template.
Variable.resolve can fail silent because that's caused by the template
author, who is referring to non-existing variables.

However, sometimes, it happens to me that the template calls a
@property of some object, which acesses at his turn an non existing
attribute of another object. An AttributeError is raised, but because
that's somewhere in Variable.resolve, it's silently ignored. It's
clear that at that point, it's not something in the template, but a
hard-to-find bug in the @property.

My feeling is that we should silence TypeError, AttributeError and
KeyError in _resolve_lookup, but only when they occur one frame deep.

Maybe I am wrong here, it's also just an opinion, and I have no real
solution... (Except for writing better unit-tests for the application
logic.)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to