On 9/22/06, Afternoon <[EMAIL PROTECTED]> wrote: > James, why are context processors not able to handle exceptions and > fall back to basic output, i.e. return an empty dictionary?
Your context processor function could, if it wanted, wrap some of its own possibly problematic code in a try/except block, catch the exception and return an empty dictionary. But that assumes your templates are designed to break gracefully when your context doesn't contain the variables they're expecting. As for the more general question of doing your own exception handling, Django already provides a mechanism for that in the 'process_exception' hook in custom middleware classes; having custom exception handling for your code is a nice thing, but I don't see why we would need to start exposing multiple places to do it. That'd probably start to feel cluttered pretty quickly. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---