report runtime process aborts correctly (#5285)

This commit is contained in:
Alex Lam S.L
2022-01-11 01:12:01 +00:00
committed by GitHub
parent c7d2837184
commit 082013c20f

View File

@@ -300,7 +300,7 @@ function run_code_exec(code, toplevel, timeout) {
details = vm.runInNewContext("(" + details + ")");
} catch (e) {}
} else if (!match) {
new Error("Script execution aborted.");
return new Error("Script execution aborted.");
}
if (!match) return details;
var ex = new global[match[1]](match[2]);