Hi Vadim,

> Am I just taking the wrong approach here or something? Considering how
> few questions I found regarding this it would appear that most people
> are either blissfully ignoring db errors or know something I don't :)

Probably. At least I never thought about wrapping save method with
try/except because I see problem with such approach.

In fact, in dev. mode, when you see such error, you see the SQL output
and usually can fix that.

In production mode all my errors are mailed to me. So I obviously see
what
happen. For most of applications I write stopping at this point is the
best strategy.
Wrapping try/expept on save would lead to some problems with Db
structure/sql/application
logic.  So at least in my code there are no cases when try/exept is
used.

More important, as general rule I have enabled transactions middleware.
So
incomplete data from views did not go directy to Db, when error happens
ROLLBACK
issued.

Alex


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to