A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx#3-28
---------------
Any error that occurs inside the 'div' will call the
'handleError' script. Note that the 'structure' option allows
the script to return HTML. Your error handling script can
examine the error and take various actions depending on the
error. Your script gets access to the error through the 'error'
variable in the namespace. For example::
## Script (Python) "handleError"
##bind namespace=_
##
error=_['error']
if error.type==ZeroDivisionError:
return "<p>Can't divide by zero.</p>"
else
return """<p>An error occurred.</p>
<p>Error type: %s</p>
<p>Error value: %s</p>""" % (error.type,
error.value)
% Anonymous User - Feb. 12, 2004 2:46 pm:
Shouldn't there be a colon after the "else"?
_______________________________________________
ZDP maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zdp
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.