----- Original Message -----
From: "Tino Wildenhain" <[EMAIL PROTECTED]>
To: "Jonathan" <[EMAIL PROTECTED]>
Cc: <zope@zope.org>
Sent: Thursday, December 15, 2005 8:18 AM
Subject: Re: [Zope] Trapping zope exceptions in python script
Jonathan schrieb:
...
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.
Well you can trap any exception which happens between your
try and except. But not outside of these, of course.
This is true everywhere (not even python only ;)
Which exceptions do you believe you might be not able
to catch?
I encountered this situation while trying to trap 'BadRequest'.
Jonathan
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )