[Zope-CMF] Re: [dev] some questions regarding Exceptions
Yuppie
schubbe at web.de
Fri Sep 19 06:39:10 EDT 2003
Hi!
Dieter Maurer wrote:
> Yuppie wrote at 2003-9-18 12:56 +0200:
> > ConflictError is derived from StandardError! "except StandardError"
> > isn't saver than a bare except.
>
> There has been a discussion that this should be changed.
> Just to be make it easy to catch errors without catching
> exceptions which are not errors.
Are you talking about this thread?
<http://mail.zope.org/pipermail/zope3-dev/2002-November/thread.html#3428>
I can't find a discussion that lead to any solution.
> > > This is widely not adhered, too, but we may start with it.
> >
> > Are you sure thats the Right Way?
>
> I find it convincing...
>
> Have a small set of exception base classes that distinquish
> the various kinds of exceptions: Errors, Problems (such
> as "ConflictError"), Warnings, ...
Sounds reasonable, but is CMF the place to start? What happens if Zope
Core people choose a different solution, e.g. a ZopeError derived from
Exception?
If we subclass from Exception, we can later switch to StandardError or
ZopeError without any backwards compatibility problems. Subclassing from
StandardError now, we are bound to that because people start using it.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list