修复编排运行脚本的错误无法被自动捕捉的BUG

This commit is contained in:
fofolee
2025-02-24 09:00:06 +08:00
parent 37f5ee2160
commit 9ad3d6ed6a
2 changed files with 2 additions and 1 deletions

View File

@@ -151,6 +151,7 @@ let getSandboxFuns = () => {
// 简化报错信息
let liteErr = (e) => {
if (!e) return;
if (typeof e === "string") return e;
return e.error
? e.error.stack.replace(/([ ] +at.+)|(.+\.js:\d+)/g, "").trim()
: e.message;