traceback in jython shell

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1120
Joined: Mon Jan 19, 2009 7:16 pm

traceback in jython shell

Post by joleenf »

How do I format a traceback error when I am creating a module in the user library? I have tried a number of formats, but the traceback prints the same every time. Below is an example of some of the commands

try:
mydata=AreaAdapter(remote_area) #get the adde data
except IndexError:
exc_type, exc_value, exc_traceback = sys.exc_info()
traceback.print_exception(exc_type, exc_value, exc_traceback,
limit=2, file=sys.stdout) #print errors to screen
print "*** print_tb:"
traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
print "*** print_exc:"
traceback.print_exc()
sys.exit(1)

Thanks,
Joleen
Post Reply