On 5/15/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > In the very beginning, I often made trivial errors in some functions > used by the methods. Sometimes this resulted in exceptions that were > ignored and resulted in missing data. This is then hard to spot since > you don't get a hint what exception it was.
Sure you do, so long as you've got debug turned on. The only exception (no pun intended) to this rule is NameError, and that's because the template system isn't yet smart enough to distinguish between a NameError raised in the execution of a method and a NameError raised by the lookup system trying to call something as a method. > Or, why does Django need to ignore exceptions in functions called in > templates in the first place? Django doesn't ignore them when debug is on. However, some functions, specifically template filters and the render() methods of template tags, are deliberately written so that they will never raise exceptions. Note, however, that template tags very explicitly *do* raise exceptions in their compilation functions when appropriate: if you call a tag with the wrong number or type of arguments, the tag will throw an exception and you'll see an error page (again, assuming you've got debug on). -- "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 [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 -~----------~----~----~----~------~----~------~--~---
