[Zope] Equivalent to exc_info in python script

Jim Gallacher jgallach@albedo.net
Sun, 21 Jul 2002 21:48:21 -0400


Hello All,

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?

Thanks,
Jim Gallacher