提交 56539bcd authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Update FunctionGraph.replace exception messages

上级 51792fea
......@@ -452,20 +452,16 @@ class FunctionGraph(MetaObject):
r = self.outputs[i]
if not r.type == new_var.type:
raise TypeError(
"The type of the replacement must be the"
" same as the type of the original Variable.",
r,
new_var,
f"The type of the replacement ({new_var.type}) must be the"
f" same as the type of the original Variable ({r.type})."
)
self.outputs[i] = new_var
else:
r = node.inputs[i]
if not r.type == new_var.type:
raise TypeError(
"The type of the replacement must be the"
" same as the type of the original Variable.",
r,
new_var,
f"The type of the replacement ({new_var.type}) must be the"
f" same as the type of the original Variable ({r.type})."
)
node.inputs[i] = new_var
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论