mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
*** empty log message ***
This commit is contained in:
parent
1a354abf7b
commit
3103d5d4e7
@ -12,6 +12,43 @@ exit = -1
|
||||
done = 0
|
||||
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
|
||||
globalClock = ClockObject.getGlobalClock()
|
||||
|
||||
@ -460,6 +497,8 @@ class TaskManager:
|
||||
except KeyboardInterrupt:
|
||||
self.stop()
|
||||
except:
|
||||
# self.stop()
|
||||
# print_exc_plus()
|
||||
raise
|
||||
|
||||
def stop(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user