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)

django_exception.patch (1.5 KB ) - added by anonymous 15 years ago.
patch to subclass StandardError

Download all attachments as: .zip

Change History (2)

by anonymous, 15 years ago

Attachment: django_exception.patch added

patch to subclass StandardError

comment:1 by dc, 15 years ago

Resolution: wontfix
Status: newclosed

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

Note: See TracTickets for help on using tickets.
Back to Top