report which interval we were evaluating when an exception happens

This commit is contained in:
David Rose 2002-09-16 15:53:35 +00:00
parent 8ff94f7387
commit 2f3bcb2b6e

View File

@ -328,6 +328,8 @@ 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.
ival = None
try:
while (self.isEventReady()): while (self.isEventReady()):
index = self.getEventIndex() index = self.getEventIndex()
t = self.getEventT() t = self.getEventT()
@ -337,6 +339,14 @@ class MetaInterval(CMetaInterval):
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