On Saturday 28 September 2013 12:24:22 Aymeric Augustin wrote: > On 28 sept. 2013, at 11:56, Shai Berger <[email protected]> wrote: > > > If Option 2 is to be viable, it needs to be modified to store the original > > problem and its traceback, and add them to the errors somehow. On Python > > 3, > > exception chaining can be used; on Python 2, some other method needs to be > > found. > > I believe it already works on Python 3, where the exception chain is > automatically displayed when an exception occurs in an `except` clause. >
As my pseudo-test exemplifies, the next query is many times -- I'd even say, typically -- executed out of the except clause, so no free rides even on Python 3. > It looks possible to implement explicit transaction chaining by storing the > exception whenever setting needs_rollback = False and adding it to the > TransactionManagementError Yes, that's what I had in mind (but I won't have time to work on coding it in the weekend). Shai. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
