Try to make an error message more helpful

This commit is contained in:
Olivier Gagnon
2021-10-11 18:47:05 -04:00
parent 1ff7f4bcd4
commit faad0ae8a7
7 changed files with 67 additions and 59450 deletions
+1 -2
View File
@@ -13,13 +13,12 @@ export function netscriptDelay(time: number, workerScript: WorkerScript): Promis
}
export function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): string {
const lineNum = "";
const server = GetServer(workerScript.hostname);
if (server == null) {
throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);
}
return "|" + server.hostname + "|" + workerScript.name + "|" + msg + lineNum;
return "|" + server.hostname + "|" + workerScript.name + "|" + msg;
}
export function resolveNetscriptRequestedThreads(