mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
*** empty log message ***
This commit is contained in:
parent
1a354abf7b
commit
3103d5d4e7
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user