[Zope3-dev] Please, no bare 'except:' clauses!

Chris Withers chrisw@nipltd.com
Tue, 12 Nov 2002 11:09:10 +0000


Shane Hathaway wrote:
> 
> 3) Set a policy that says nothing should ever use bare "except:".  This 
> policy breaks up, though, for error reporting and logging.  If an error 
> occurs while attempting to display or log an exception with a traceback, 
> you really don't want the error to propagate.  You might want it logged 
> somewhere.  This would require a change to both past and future 
> application code. :-)

This also has the downside that it breaks the Zope 3 requirement to be able to 
use _any_ python code without alteration...

cheers,

Chris