提交 e898dbf9 authored 作者: Valentin Bisson's avatar Valentin Bisson

Fixed minor formatting error while raising exception at function compile time.

上级 dd4f0c5c
......@@ -462,9 +462,11 @@ class Function(object):
try:
s = finder[item]
except KeyError:
raise TypeError("Unknown input or state: %s" % item)
print item
raise TypeError("Unknown input or state: %s" % str(item))
if s is DUPLICATE:
raise TypeError("Ambiguous name: %s - please check the names of the inputs of your function for duplicates." % item)
raise TypeError("Ambiguous name: %s - please check the names '\
'of the inputs of your function for duplicates." % str(item))
if isinstance(s, gof.Container):
return s.value
else:
......@@ -475,9 +477,10 @@ class Function(object):
except KeyError:
# Print informative error message.
msg = get_info_on_inputs(named_inputs, n_unnamed_inputs)
raise TypeError("Unknown input or state: %s. %s" % (item, msg))
raise TypeError("Unknown input or state: %s. %s" % (str(item), msg))
if s is DUPLICATE:
raise TypeError("Ambiguous name: %s - please check the names of the inputs of your function for duplicates." % item)
raise TypeError("Ambiguous name: %s - please check the names '\
'of the inputs of your function for duplicates." % str(item))
if isinstance(s, gof.Container):
s.value = value
s.provided += 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论