[Zope] Trapping zope exceptions in python script

Andreas Jung lists at andreas-jung.com
Thu Dec 15 08:14:28 EST 2005



--On 15. Dezember 2005 08:03:22 -0500 Jonathan <dev101 at magma.ca> wrote:

>
> ----- Original Message ----- From: "J Cameron Cooper"
>>
> It seems strange that one can, using plain vanilla python scripts,  trap
> bare 'try/excepts' (and I agree with Andreas that this is not a good
> thing to do!) and that one can trap python built-in exceptions, but that
> one cannot trap zope exceptions.  Why allow python scripts to trap zope
> exceptions using a bare try/except (and then have to re-raise everything
> except the target zope exception), but not allow python scripts to target
> specific zope exceptions?  I don't see the reasoning behind this approach.
>
My 2 cents: PythonScripts are restricted and are *not* thought to be a full 
replacement for Python modules. If you need this functionaltiy consider 
writing a Zope Product, using external methods or using TrustedExecutables.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051215/ee0d63fc/attachment.bin


More information about the Zope mailing list