raise AttributeError, \
'Parent of %s type %s not found at path %s' \
% (base.name, ptype, self._path)
+
result, done = obj.find(ptype, self._path)
obj = obj.parent
p = NodeParam(pname, param, value)
instance.params.append(p)
instance.param_names[pname] = p
- except:
- print 'Exception while evaluating %s.%s' % \
- (instance.path, pname)
- raise
+ except Exception, e:
+ raise e.__class__, 'Exception while evaluating %s.%s\n%s' % \
+ (instance.path, pname, e)
return instance
param.value = [ self.unproxy(pv, ptype) for pv in pval ]
else:
param.value = self.unproxy(pval, ptype)
- except:
- print 'Error while fixing up %s:%s' % (self.path, param.name)
- raise
+ except Exception, e:
+ raise e.__class__, 'Error while fixing up %s:%s\n%s' % \
+ (self.path, param.name, e)
for child in self.children:
assert(child != self)
value = param.convert(param.value)
string = param.string(value)
- except:
- print 'exception in %s:%s' % (self.path, param.name)
- raise
+ except Exception, e:
+ raise e.__class__, 'exception in %s:%s\n%s' % \
+ (self.path, param.name, e)
print '%s = %s' % (param.name, string)
value = param.convert(param.value)
string = param.string(value)
- except:
- print 'exception in %s:%s' % (self.name, param.name)
+ except Exception, e:
+ raise e.__class__, 'exception in %s:%s\n%s' % \
+ (self.name, param.name, e)
raise
if isConfigNode(param.ptype) and string != "Null":
simobjs.append(string)
for so in simobjs:
label += "|<%s> %s" % (so, so)
- dot.add_edge(pydot.Edge("%s:%s" % (self.path, so), so, tailport="w"))
+ dot.add_edge(pydot.Edge("%s:%s" % (self.path, so), so,
+ tailport="w"))
label += '}'
dot.add_node(pydot.Node(self.path,shape="Mrecord",label=label))