未验证 提交 8da89b81 编写于 作者: W WangZhen 提交者: GitHub

Polish dy2st error message (#52527)

上级 d2939cab
......@@ -245,12 +245,18 @@ class ErrorData:
# Simplify error value to improve readability if error is raised in runtime
if self.in_runtime:
if int(
os.getenv(SIMPLIFY_ERROR_ENV_NAME, DEFAULT_SIMPLIFY_NEW_ERROR)
):
self._simplify_error_value()
message_lines.append(str(self.error_value))
return '\n'.join(message_lines)
try:
if int(
os.getenv(
SIMPLIFY_ERROR_ENV_NAME, DEFAULT_SIMPLIFY_NEW_ERROR
)
):
self._simplify_error_value()
except:
pass
else:
message_lines.append(str(self.error_value))
return '\n'.join(message_lines)
# Step2: Optimizes stack information with source code information of dygraph from user.
user_code_traceback_index = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册