[Zope-CMF] [dev] Unauthorized and CMFCoreExceptions: small proposal
Yuppie
schubbe at web.de
Wed Jan 7 05:54:12 EST 2004
Hi!
3 months ago I added CMFCoreExceptions to CVS HEAD. There were two
reasons to do that:
1.) Exceptions are easier to handle and to make usable TTW if they are
in one place like permissions.
2.) Hierarchically structured Exceptions provide additional
possibilities to catch groups of them are add special code.
I still believe in reason one. Given the fact bare excepts are evil and
(most) class exceptions need to be imported to catch them we have to
make them available in Scripts. (We didn't need that with the old string
exceptions.)
Based one the recent discussion I propose to add these aliases:
'AccessControl_Unauthorized' to raise Unauthorized
'zExceptions_Unauthorized' to catch Unauthorized
'CopyError' (already there)
'ResourceLockedError'
and other Zope error aliases and CMF errors if needed
There are not many people who like the complexity added by
hierarchically structured Exceptions. I propose to remove the hierarchy
again ('CMFError', 'CMFNotImplementedError', 'CMFUnauthorizedError',
'CMFResourceLockedError'), at least for now.
These classes existed only in CVS HEAD and were not very useful because
they are just some pieces of a hierarchy, so I think they can be removed
without providing any backwards compatibility.
If there are no objections I'll soon make a checkin based on this proposal.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list