[Zope-CMF] [dev] Exceptions: small proposal
Yuppie
schubbe at web.de
Sun Sep 21 12:59:28 EDT 2003
Hi!
Last weeks discussion regarding Exceptions was without a clear result,
but I hope the following is the least common denominator:
1.) For TTW usage of Exceptions (and for other reasons) it is useful to
have all Exceptions in one module. We call this module 'CMFCoreExceptions'.
2.) Deriving all Exceptions from a common base class doesn't hurt
anybody, as long as existing base classes are not removed. We call this
base class 'CMFError'. Maybe this class should subclass from
StandardError, but as long as we don't know that for sure we use Exception.
3.) Moving existing CMF Exception classes to CMFCoreExceptions.py
doesn't cause any backwards compatibility issues, as long as they are
imported in their current modules. We can do that step by step.
4.) Subclassing Zope and Python Exceptions also doesn't hurt. As a first
step I added 'CMFNotImplementedError' and 'CMFUnauthorizedError' to be
used by the new deleteMembers method. Existing NotImplementedErrors and
Unauthorized errors can be replaced step by step.
Comments are welcome. If there are no objections, I'll merge
<http://cvs.zope.org/CMF/CMFCore/Attic/CMFCoreExceptions.py?rev=1.1.2.1&content-type=text/plain>
into HEAD as it is.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list