[Zope] Equivalent to exc_info in python script

Dieter Maurer dieter@handshake.de
Tue, 23 Jul 2002 23:28:13 +0200


Jim Gallacher writes:
 > I'd like to use examine the error type and value when an exception
 > is thrown in a python script, equivalent to:
 > 
 > err_type = sys.exc_info()[0]
 > err_value = sys.exc_info()[1]
 > 
 > But sys.exc_info can't be accessed from a script.
 > 
 > I'm sure there must be an easy way to get at the error value and
 > type, but I can't find it.
 > 
 > Can anyone help?
You may want to read the "README" file for PythonScripts
(either in the source directory or in the README tab of the product).


Dieter