From 082013c20f663b071fcf1e30c27a459b1e63c39b Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 11 Jan 2022 01:12:01 +0000 Subject: [PATCH] report runtime process aborts correctly (#5285) --- test/sandbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sandbox.js b/test/sandbox.js index f4a19bb6..25e69e11 100644 --- a/test/sandbox.js +++ b/test/sandbox.js @@ -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]);