[Zope-CMF] Re: [dev] Exceptions: small proposal

Yuppie schubbe at web.de
Tue Sep 23 02:38:45 EDT 2003


Hi Dieter!


Thanks for all your feedback!

Dieter Maurer wrote:

> Yuppie wrote at 2003-9-21 18:59 +0200:
>  > ...
>  > 4.) Subclassing Zope and Python Exceptions also doesn't hurt. As a first 
>  > step I added 'CMFNotImplementedError' and 'CMFUnauthorizedError' to be 
>  > used by the new deleteMembers method. Existing NotImplementedErrors and 
>  > Unauthorized errors can be replaced step by step.
> 
> I would not wrap these standard errors for CMF.
> 
> It seems irrelevant whether a "NotImplementedError" or
> "Unauthorized" comes from CMF or some other source, e.g.
> an "Unauthorized" raised by TAL or Zope's security machinery.

My motivation for these changes was to make it easier to catch 
Exceptions in skin Scripts. At least we would need to make Unauthorized 
accessible TTW.

Right now there exists no save catch all Exception. Skin Scripts often 
do high level end user error handling. It's not the perfect solution, 
but I think subclassing from CMFError provides a quite save catch all 
for that kind of errors.


But if people don't want this, I can live without. Maybe just end user 
focused raise statements should use wrapped standard errors.


Cheers,
	Yuppie





More information about the Zope-CMF mailing list