Hello,

A pre-requisite for persistent database connections in Django [1] is robust
error handling, especially for transaction commits and rollbacks.

Currently, Django wraps and re-raises database exceptions [2] raised by
queries, but not those raised by transaction-related operations [3]. To fix
this, I have created a pull request that centralizes exception wrapping [4].

In addition to making error handling more robust, it provides a single
location to handle database-related errors, which will make it easier to
detect and close non-functional database connections.

Would anyone be kind enough to review the pull request? Thanks.

[1] https://groups.google.com/d/topic/django-developers/NwY9CHM4xpU/discussion
[2] https://docs.djangoproject.com/en/dev/ref/exceptions/#database-exceptions
[3] https://code.djangoproject.com/ticket/19920
[4] https://github.com/django/django/pull/855

-- 
Aymeric.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to