Opened 15 years ago
Closed 15 years ago
#11784 closed (wontfix)
exceptions should sublcass StandardError, not Exception
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | 1.1 |
Severity: | Keywords: | exception | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
a quick look at the standard python library's exception hierarchy ( http://docs.python.org/library/exceptions.html#exception-hierarchy ) will show that in all but a few special cases, exceptions should subclass StandardError. all of django's exceptions subclass the parent class of StandardError, Exception. In addition to being good practice to keep a clean class hierarchy, coders accustomed to catching StandardError may have unexpected results when using django.
Attachments (1)
Change History (2)
by , 15 years ago
Attachment: | django_exception.patch added |
---|
comment:1 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
exception Exception
All built-in, non-system-exiting exceptions are derived from this class. All user-defined exceptions should also be derived from this class.
http://docs.python.org/library/exceptions.html#exceptions.Exception
patch to subclass StandardError