SignaRouter() catches exceptions and returns False

parent 283b0760
...@@ -416,12 +416,15 @@ class CoreObject(object): ...@@ -416,12 +416,15 @@ class CoreObject(object):
if not receiver.assignedOperator or\ if not receiver.assignedOperator or\
(receiver.isPreemptive and len(receiver.Res.users)>0): (receiver.isPreemptive and len(receiver.Res.users)>0):
if receiver.isLoadRequested(): if receiver.isLoadRequested():
from Globals import G try:
if not G.Router.invoked: from Globals import G
# self.printTrace(self.id, signal='router') if not G.Router.invoked:
G.Router.invoked=True # self.printTrace(self.id, signal='router')
G.Router.isCalled.succeed(self.env.now) G.Router.invoked=True
return True G.Router.isCalled.succeed(G.env.now)
return True
except:
return False
else: else:
return False return False
except: except:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment