7 Jun
2004
7 Jun
'04
7:35 p.m.
I need access to error info inside of an except in a Python script. How do I get that? Specifically, I'm executing an Oracle stored procedure, and if I catch an exception, I want to include the error message in the return value. Here's a greatly simplified example using sys.exc_info if I could actually import and use it: import sys try: context.my_proc print 'OK' except: print 'Error: ' + sys.exc_info()[1] return printed Is there a Zope-ish way to access the info returned by exc_info()? Thanks, Jim