[Zope] Products: using Product's specific exceptions from TTW
Python scripts
Gilles Lenfant
glenfant at bigfoot.com
Thu Jan 8 03:52:05 EST 2004
Hi zopistas...
Hmmm seems that the main question is in the title but here's the
background...
I made a business logic object that must be customized with options and TTW
Python scripts. Some of the methods used from Python scripts may raise
specific custom exception but I didn't get the way making those exceptions
available to Python scripts. As a workaround, I use builtin exceptions like
IOError and others in a bad way.
What I would like to do...
from Products.MyProduct.MyExceptions import InvalidDateRangeError
...
try:
# do some stuff
except InvalidDateRangeError, e:
# do other stuff
Many thanks in advance for your hint.
--
Gilles
More information about the Zope
mailing list