提交 58782af5 authored 作者: Frederic's avatar Frederic

Fix error reporting when the error is reported by the input, not by an op.

上级 4af40ea8
......@@ -1392,7 +1392,8 @@ class _CThunk(object):
trace = ()
try:
exc_type, _exc_value, exc_trace = self.error_storage
self.position_of_error = self.nodes.index(task)
if task in self.nodes:
self.position_of_error = self.nodes.index(task)
# this can be used to retrieve the location the Op was declared
exc_value = exc_type(_exc_value)
exc_value.__thunk_trace__ = trace
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论