ruby: Improved try except blocks in ruby creation
Replaced the sys.exit in the try-except blocks with raise so that the python call stack will be printed
This commit is contained in:
parent
45f6f31d7a
commit
9b130c153b
1 changed files with 6 additions and 5 deletions
|
@ -66,7 +66,7 @@ def create_system(options, system, piobus = None, dma_devices = []):
|
||||||
% protocol)
|
% protocol)
|
||||||
except:
|
except:
|
||||||
print "Error: could not create sytem for ruby protocol %s" % protocol
|
print "Error: could not create sytem for ruby protocol %s" % protocol
|
||||||
sys.exit(1)
|
raise
|
||||||
|
|
||||||
#
|
#
|
||||||
# Important: the topology must be created before the network and after the
|
# Important: the topology must be created before the network and after the
|
||||||
|
@ -74,10 +74,11 @@ def create_system(options, system, piobus = None, dma_devices = []):
|
||||||
#
|
#
|
||||||
exec "import %s" % options.topology
|
exec "import %s" % options.topology
|
||||||
try:
|
try:
|
||||||
net_topology = eval("%s.makeTopology(all_cntrls, options)" % options.topology)
|
net_topology = eval("%s.makeTopology(all_cntrls, options)" \
|
||||||
|
% options.topology)
|
||||||
except:
|
except:
|
||||||
print "Error: could not create topology %s" % options.topology
|
print "Error: could not create topology %s" % options.topology
|
||||||
sys.exit(1)
|
raise
|
||||||
|
|
||||||
if options.garnet_network == "fixed":
|
if options.garnet_network == "fixed":
|
||||||
network = GarnetNetwork_d(topology = net_topology)
|
network = GarnetNetwork_d(topology = net_topology)
|
||||||
|
|
Loading…
Reference in a new issue