#11716: Various methods in django.db.models.fields don't wrap ValueErrors and
allow
them to escape
---------------------------------------------------+------------------------
Reporter: Leo | Owner: Leo
Status: assigned | Milestone: 1.3
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 1 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by kmtracey):
Is there no way to do this is a backwards-compatible way, such that code
which currently does not raise exceptions when handed bad values continues
to not raise exceptions when handed the same bad values? Even with
documentation this is the kind of change that is hard to easily "upgrade
to" and be sure that you have actually covered all the places where you
(or some piece of code you have inherited) may have used "except
!ValueError" or whatever where now some other exception is more properly
going to be raised. There was mention of possibly having !ValidationError
inherit from !ValueError above -- I would like to see some investigation
of the feasibility of an approach like that or at least some explanation
of why it can't possibly work before going ahead and adding a backwards-
incompatible alternative.
--
Ticket URL: <http://code.djangoproject.com/ticket/11716#comment:29>
Django <http://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.