提交 997b197a 编写于 作者: fxy060608's avatar fxy060608

chore(uts): add [EXCEPTION] flag

上级 283c8429
......@@ -36,7 +36,9 @@ export function parseUTSJavaScriptRuntimeStacktrace(
? COLORS[options.logType as string] || ''
: ''
const [errorCode, ...other] = codes
let error = 'error: ' + errorCode
let error =
`error: ${errorCode.includes('[EXCEPTION] ') ? '' : '[EXCEPTION] '}` +
errorCode
if (color) {
error = color + error + color
}
......@@ -47,7 +49,9 @@ export function parseUTSJavaScriptRuntimeStacktrace(
const color = options.logType
? COLORS[options.logType as string] || ''
: ''
let error = 'error: ' + res[0]
let error =
`error: ${res[0].includes('[EXCEPTION] ') ? '' : '[EXCEPTION] '}` +
+res[0]
if (color) {
error = color + error + color
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册