I just spent a good part of my afternoon tracking down a bug in my
code, that eventually turned out to be a Unicode encoding problem. The
reason it took me so long to track down the problem is this code here
in 'template/__init__.py':

794     class VariableNode(Node):
...
801         def render(self, context):
802             try:
803                 output = force_unicode(self.filter_expression.resolve
(context))
804             except UnicodeDecodeError:
805                 # Unicode conversion can fail sometimes for reasons
out of our
806                 # control (e.g. exception rendering). In that case,
we fail quietly.
807                 return ''

Is there a good reason that the widget rendering is silently capturing
all Unicode errors? Now that I know that it's doing this, it won't
take me so long to figure out the problem if it happens again, but it
certainly wasn't expected behavior. At the very least, maybe we could
return 'UnicodeDecodeError' instead of a blank string?

Cheers,
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to