#15901: Django should wrap all PEP 249 exceptions in db.utils
-------------------------------------+-------------------------------------
Reporter: xiaket | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.3
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by jamesh):
Replying to [comment:13 akaariai]:
> You lose the ability to know what types of exceptions queryset execution
can raise.
At the moment, you know that if a database error occurs in executing a
query, then you'll be able to catch it as `django.utils.DatabaseError` or
`django.utils.IntegrityError` (anything else passes through unchanged).
With my patch, you can still catch those same two exceptions in the same
situations.
Yes there are more possible exception types that will pass up, but if you
are happily using the `django.utils` exceptions you don't need to worry
about them.
--
Ticket URL: <https://code.djangoproject.com/ticket/15901#comment:14>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en.