From 7ec1ced7297b22391299120c44aec3d3b50a023d Mon Sep 17 00:00:00 2001 From: Master-Guy <566429+Master-Guy@users.noreply.github.com> Date: Sat, 19 Mar 2022 18:21:18 +0100 Subject: [PATCH] dialogBox+stop on NS1 async function throw --- src/NetscriptWorker.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/NetscriptWorker.ts b/src/NetscriptWorker.ts index c561b5a9d..fa9924141 100644 --- a/src/NetscriptWorker.ts +++ b/src/NetscriptWorker.ts @@ -178,7 +178,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise`; + msg += "
"; + msg += errorMsg; + dialogBoxCreate(msg); + workerScript.env.stopFlag = true; + workerScript.running = false; + killWorkerScript(workerScript); + return Promise.resolve(workerScript); + } }); }; int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));