[Zope-CMF] [dev] some questions regarding Exceptions

Yuppie schubbe at web.de
Thu Sep 11 21:26:35 EDT 2003


Hi!


Today I did have a closer look at Exception handling in CMF. These are 
my questions:


1.) document_edit.py, metadata_edit.py and newsitem_edit.py in 
CMFDefault are using this pattern:

try:
     context.edit( ...
     context.REQUEST.RESPONSE.redirect( ...
except Exception, msg:
     context.REQUEST.RESPONSE.redirect( ...

Am I right that these excepts also catch ConflictErrors, what's a Bad 
Thing in general and especially with edit methods?

see: <http://mail.zope.org/pipermail/zope-cmf/2003-June/018870.html>


2.) There are still many string exceptions in CMF. All the others are 
not accessible TTW.

What would be the right way to resolve this?

We could use allow_module() and allow_class(). I guess in that case all 
Exceptions should be in one module. Something like CMFCoreExceptions.py?

Or are there some CMF Exceptions that shouldn't be accessible TTW?

Other thoughts?


Cheers,

Yuppie





More information about the Zope-CMF mailing list