#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 gcbirzan):

 Replying to [comment:12 jamesh]:
 > Both of your suggestions prevent users from writing standard Python
 "except" clauses to catch particular classes of database errors, which
 seems to be one of the goals of this ticket.

 Wow, I'm a retard. I just reread my examples, and they all use the base
 class. Yeah, it should be e.__class__ instead of Database.DatabaseError.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/15901#comment:22>
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.

Reply via email to