[Zope-dev] Greedy except clauses

Barry A. Warsaw barry@digicool.com
Mon, 12 Feb 2001 09:55:06 -0500


>>>>> "TJ" == Tom Jenkins <TJenkins@DevIS.com> writes:

    TJ> I agree.  I think this would be a good project for new zope
    TJ> developers to get into the zope code.  Would we need an
    TJ> ZopeException class hierarchy?

IME, it's been a good idea to have a root exception class per
subsystem, which all inherit from a single system-wide root, which
itself inherits from Exception.  That was the motivation for Python's
standard exception heirarchy.

Greedy excepts have their uses, but IMHO they are limited to
`infrastructure wrappers' only.  E.g. a CGI wrapper might catch all
exceptions so they don't percolate up to the web server, or a command
line reader would catch them all so they don't exit the read loop.

-Barry