fix unknown script die for known reason

This commit is contained in:
Olivier Gagnon 2021-12-12 14:57:44 -05:00
parent e117548895
commit 7d6947ee01
2 changed files with 3 additions and 3 deletions

@ -20,8 +20,7 @@ export function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): s
}
for (const url in BlobsMap) {
console.log(url);
// msg = msg.replace(new RegExp(url, "g"), BlobsMap[url]);
msg = msg.replace(new RegExp(url, "g"), BlobsMap[url]);
}
return "|DELIMITER|" + server.hostname + "|DELIMITER|" + workerScript.name + "|DELIMITER|" + msg;

@ -140,7 +140,8 @@ function startNetscript2Script(workerScript: WorkerScript): Promise<WorkerScript
workerScript.errorMessage = e;
throw workerScript;
}
throw e; // Don't know what to do with it, let's rethrow.
workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e);
throw workerScript; // Don't know what to do with it, let's rethrow.
});
}