fix some stack traces not printing file name

This commit is contained in:
Olivier Gagnon
2021-12-12 14:49:02 -05:00
parent 4460bf1613
commit e117548895
2 changed files with 15 additions and 2 deletions
+6
View File
@@ -1,6 +1,7 @@
import { isString } from "./utils/helpers/isString";
import { GetServer } from "./Server/AllServers";
import { WorkerScript } from "./Netscript/WorkerScript";
import { BlobsMap } from "./NetscriptJSEvaluator";
export function netscriptDelay(time: number, workerScript: WorkerScript): Promise<void> {
return new Promise(function (resolve) {
@@ -18,6 +19,11 @@ export function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): s
throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);
}
for (const url in BlobsMap) {
console.log(url);
// msg = msg.replace(new RegExp(url, "g"), BlobsMap[url]);
}
return "|DELIMITER|" + server.hostname + "|DELIMITER|" + workerScript.name + "|DELIMITER|" + msg;
}