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

Polish dy2st error message (#52527)

上级 d2939cab
......@@ -245,10 +245,16 @@ class ErrorData:
# Simplify error value to improve readability if error is raised in runtime
if self.in_runtime:
try:
if int(
os.getenv(SIMPLIFY_ERROR_ENV_NAME, DEFAULT_SIMPLIFY_NEW_ERROR)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册