merge v0.56.0

This commit is contained in:
Olivier Gagnon
2021-10-12 01:35:30 -04:00
74 changed files with 9894 additions and 2970 deletions
+10 -5
View File
@@ -125,10 +125,14 @@ function startNetscript2Script(workerScript: WorkerScript): Promise<WorkerScript
.catch((e) => reject(e));
}).catch((e) => {
if (e instanceof Error) {
workerScript.errorMessage = makeRuntimeRejectMsg(
workerScript,
e.message + ((e.stack && "\nstack:\n" + e.stack.toString()) || ""),
);
if (e instanceof SyntaxError) {
workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + " (sorry we can't be more helpful)");
} else {
workerScript.errorMessage = makeRuntimeRejectMsg(
workerScript,
e.message + ((e.stack && "\nstack:\n" + e.stack.toString()) || ""),
);
}
throw workerScript;
} else if (isScriptErrorMessage(e)) {
workerScript.errorMessage = e;
@@ -190,7 +194,8 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
cb(res);
})
.catch(function (err: any) {
console.error(err);
// workerscript is when you cancel a delay
if (!(err instanceof WorkerScript)) console.error(err);
});
};
int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));