mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
report which interval we were evaluating when an exception happens
This commit is contained in:
parent
8ff94f7387
commit
2f3bcb2b6e
@ -328,15 +328,25 @@ class MetaInterval(CMetaInterval):
|
|||||||
# intervals it can, and then indicate the Python intervals
|
# intervals it can, and then indicate the Python intervals
|
||||||
# that must be invoked through this interface.
|
# that must be invoked through this interface.
|
||||||
|
|
||||||
while (self.isEventReady()):
|
ival = None
|
||||||
index = self.getEventIndex()
|
try:
|
||||||
t = self.getEventT()
|
while (self.isEventReady()):
|
||||||
eventType = self.getEventType()
|
index = self.getEventIndex()
|
||||||
self.popEvent()
|
t = self.getEventT()
|
||||||
|
eventType = self.getEventType()
|
||||||
|
self.popEvent()
|
||||||
|
|
||||||
ival = self.pythonIvals[index]
|
ival = self.pythonIvals[index]
|
||||||
ival.privDoEvent(t, eventType)
|
ival.privDoEvent(t, eventType)
|
||||||
ival.privPostEvent()
|
ival.privPostEvent()
|
||||||
|
ival = None
|
||||||
|
except:
|
||||||
|
if ival != None:
|
||||||
|
print "Exception occurred while processing %s of %s:" % (ival.getName(), self.getName())
|
||||||
|
else:
|
||||||
|
print "Exception occurred while processing %s:" % (self.getName())
|
||||||
|
print self
|
||||||
|
raise
|
||||||
|
|
||||||
def privDoEvent(self, t, event):
|
def privDoEvent(self, t, event):
|
||||||
# This function overrides the C++ function to initialize the
|
# This function overrides the C++ function to initialize the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user