[Zope-Coders] RFC: Death to string exceptions

Casey Duncan casey at zope.com
Mon Nov 17 10:43:01 EST 2003


On 17 Nov 2003 10:27:48 -0500
Tres Seaver <tseaver at zope.com> wrote:

> Can anyone thing of a good reason not to exterminate the use of string
> exceptions in the Zope core, both for the 2.7 branch and for the head? 
> For instance, are there known (not hypothetical) products which rely on
> them deeply?  There are several places where we raise "named" strings; 
> clients who already use the names should be safe.
> 
> Removing them will silence the majority of deprecation warnings which
> currently pollute the 'make test' output for 2.7.

+1

Many of those exceptions are uncatchable anyway, and places that explicitly test for them (Like "Not Found" should be easy to spot).

I would also vote for having a canoncial place for core exceptions and possibly a recommended place for products. I think Zope3 used/uses interfaces.py for this, but I'm not sure how much I like this convention.

Zope2 already has the zExceptions pacakage, which is ok aside from the fact that is the exception to every naming convention rule I've every seen *sigh*

-Casey



More information about the Zope-Coders mailing list