*** empty log message ***

This commit is contained in:
Joe Shochet 2001-08-22 04:40:38 +00:00
parent 1a354abf7b
commit 3103d5d4e7

View File

@ -12,6 +12,43 @@ exit = -1
done = 0 done = 0
cont = 1 cont = 1
def print_exc_plus():
"""
Print the usual traceback information, followed by a listing of all the
local variables in each frame.
"""
import sys
import traceback
tb = sys.exc_info()[2]
while 1:
if not tb.tb_next:
break
tb = tb.tb_next
stack = []
f = tb.tb_frame
while f:
stack.append(f)
f = f.f_back
stack.reverse()
traceback.print_exc()
print "Locals by frame, innermost last"
for frame in stack:
print
print "Frame %s in %s at line %s" % (frame.f_code.co_name,
frame.f_code.co_filename,
frame.f_lineno)
for key, value in frame.f_locals.items():
print "\t%20s = " % key,
#We have to be careful not to cause a new error in our error
#printer! Calling str() on an unknown object could cause an
#error we don't want.
try:
print value
except:
print "<ERROR WHILE PRINTING VALUE>"
# Store the global clock # Store the global clock
globalClock = ClockObject.getGlobalClock() globalClock = ClockObject.getGlobalClock()
@ -460,6 +497,8 @@ class TaskManager:
except KeyboardInterrupt: except KeyboardInterrupt:
self.stop() self.stop()
except: except:
# self.stop()
# print_exc_plus()
raise raise
def stop(self): def stop(self):