Re: Catching Exceptions thrown in .save() / Best practice question

2007-11-12 Thread marknca
Malcolm, Spot on on all points. A ridiculous logic error in my model code was raising an exception in an unexpected place. A little bit of proper code review caught it. I appreciate your insights on this one. Cheers, Mark --~--~-~--~~~---~--~~ You received

Re: Catching Exceptions thrown in .save() / Best practice question

2007-11-11 Thread Malcolm Tredinnick
On Sun, 2007-11-11 at 20:44 -0800, marknca wrote: > According to a previous (http://groups.google.com/group/django-users/ > browse_thread/thread/64a9558d5c02e39/c0c28daed410898d?lnk=gst=catch > +save+exception#c0c28daed410898d) post it's bad practice to wrap a > model's .save() in a try/except.

Catching Exceptions thrown in .save() / Best practice question

2007-11-11 Thread marknca
According to a previous (http://groups.google.com/group/django-users/ browse_thread/thread/64a9558d5c02e39/c0c28daed410898d?lnk=gst=catch +save+exception#c0c28daed410898d) post it's bad practice to wrap a model's .save() in a try/except. Adrian suggests using manipulators instead. I'm writing a