Re: Ticket #3349 patch review

2009-12-21 Thread Johannes Dollinger
Am 15.12.2009 um 19:57 schrieb Andrew Durdin: > On Dec 14, 11:00 pm, ab wrote: >>> `wrap_and_raise()` will appear in the traceback, `raise >>> wrap_exception(SomeException())` would be cleaner. >> >> I like that > > But you must use the three-argument `raise` statement to

Re: Ticket #3349 patch review

2009-12-15 Thread Andrew Durdin
While I think of it: One thing this patch should address is updating the `contributing` page to mention calling wrap_and_raise whenever you are "catching an exception arising from user-supplied code and then raising a different

Re: Ticket #3349 patch review

2009-12-15 Thread Andrew Durdin
On Dec 14, 11:00 pm, ab wrote: > > `wrap_and_raise()` will appear in the traceback, `raise   > > wrap_exception(SomeException())` would be cleaner. > > I like that But you must use the three-argument `raise` statement to supply your own traceback in Python 2.x. You could

Re: Ticket #3349 patch review

2009-12-14 Thread ab
> `wrap_and_raise()` will appear in the traceback, `raise   > wrap_exception(SomeException())` would be cleaner. I like that > Better yet, make all exceptions that are used to reraise other   > exceptions a subclass of WrappingException (pick a better name) that   > either takes a `cause=exc` or

Re: Ticket #3349 patch review

2009-12-14 Thread Johannes Dollinger
Am 14.12.2009 um 10:53 schrieb Andrew Durdin: > I'm the author of the current patch; I'll just add a bit of > background. > > On Dec 12, 10:18 pm, ab wrote: >> >> 1. Scope -- the patch generalizes the issue and addresses it >> throughout Django. Are people ok with that? >

Re: Ticket #3349 patch review

2009-12-14 Thread Andrew Durdin
I'm the author of the current patch; I'll just add a bit of background. On Dec 12, 10:18 pm, ab wrote: > > 1. Scope -- the patch generalizes the issue and addresses it > throughout Django. Are people ok with that? Since the problem of raising new exceptions and losing the

Re: Ticket #3349 patch review

2009-12-12 Thread Jeremy Dunck
On Sat, Dec 12, 2009 at 4:18 PM, ab wrote: > I'd like some opinions on the existing patch for > http://code.djangoproject.com/ticket/3349. > This ticket ("If an ImportError occurs within some loaders a rather > confusing exception is raised") seeks to address the difficulty

Ticket #3349 patch review

2009-12-12 Thread ab
I'd like some opinions on the existing patch for http://code.djangoproject.com/ticket/3349. This ticket ("If an ImportError occurs within some loaders a rather confusing exception is raised") seeks to address the difficulty of debugging ImportErrors raised in template tag library. The cause of