That's true. That doesn't mean, however, that the ResponseException class should be removed; it's useful in that you don't need to go like this: exc = Exception() exc.response = HttpResponse('content', ...) raise exc You can just do it all in one line. It could be put in 'django.core.exceptions', I would have thought. It's not *hugely* necessary to have in core, but it would be nice to integrate it with CommonMiddleware. Plus, on the Django middleware docs, it says that if there are any suggestions for useful middleware, just post them to the group. Well, it's only a suggestion, but I think it could save a lot of time in development. I have a lot of these suggestions (like, a *lot*), but I just like to run them all by you guys just to check if there's anything useful in there.
Regards, Zack On Sep 18, 1:35 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On Wed, Sep 17, 2008 at 6:30 PM, zvoase <[EMAIL PROTECTED]> wrote: > > > Sorry, here:http://dpaste.com/hold/78774/ > > > On Sep 18, 1:29 am, zvoase <[EMAIL PROTECTED]> wrote: > >> Yeah, that's it, process_exception is *definitely* what I need :) > >> But as for the idea, how do you feel about it? > >> By the way, I've just posted a better version of it (sorry for my > >> temporary lack of brain) here:http://dpaste.com/hold/78773/ > > So, that's a tiny amount of code, and not hard to do on your own. > > I don't think it needs to be in core. (Indeed, I've had something > like this in my stack for quite a while). > > Anyway, even if it went in, I'd think hasattr(exception, 'response') > would be better. What's gained by forcing inheritance here? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---