提交 a75ff39f authored 作者: Frederic's avatar Frederic

Don't change the error type when adding extra error info.

上级 86a27c48
...@@ -817,8 +817,7 @@ class Elemwise(Op): ...@@ -817,8 +817,7 @@ class Elemwise(Op):
min_informative_str(output) + '\n' min_informative_str(output) + '\n'
errormsg += 'original exception was: ' + '\n'.join( errormsg += 'original exception was: ' + '\n'.join(
traceback.format_exception_only(*sys.exc_info()[0:2])) traceback.format_exception_only(*sys.exc_info()[0:2]))
raise Exception(errormsg)
else:
e.args = e.args + (errormsg, ) e.args = e.args + (errormsg, )
raise raise
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论