fix uncaught promise

This commit is contained in:
Olivier Gagnon
2021-12-20 13:57:07 -05:00
parent 5dc9ac040a
commit e9886cc6bc
3 changed files with 21 additions and 0 deletions
+1
View File
@@ -126,6 +126,7 @@ function startNetscript2Script(workerScript: WorkerScript): Promise<WorkerScript
})
.catch((e) => reject(e));
}).catch((e) => {
console.log(e);
if (e instanceof Error) {
if (e instanceof SyntaxError) {
workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + " (sorry we can't be more helpful)");