On Mar 9, 4:44 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > If > you want to test in-function error recovery, you're going to have to do > the rollback yourself, just like in normal code.
Why should normal code which does not use explicit transactions have to do the rollback? Why not rollback an unmanaged transaction automatically? The current approach is - confusing - just search Trac or the user list for "current transaction is aborted" for abundant evidence of this - awkward - robust usage of the database *without explicit transactions* requires wrapping every operation in a try/except/ rollback block. Command line usage requires manually calling transaction.rollback() after any error. - undocumented - unhelpful - is there a benefit to the current approach? - unneccessary - AFAICT there is no disadvantage to automatic rollback of *unmanaged* transactions. Kent --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
