MISC: Remove unsed attribues of internal ScriptDeath. (#1513)

This commit is contained in:
Tom Prince
2024-07-23 18:50:51 -06:00
committed by GitHub
parent 42bcfa1889
commit 854c1a5921
3 changed files with 3 additions and 14 deletions
+3 -7
View File
@@ -76,14 +76,10 @@ export function errorMessage(ctx: NetscriptContext, msg: string, type = "RUNTIME
}
/** Generate an error dialog when workerscript is known */
export function handleUnknownError(e: unknown, ws: WorkerScript | ScriptDeath | null = null, initialText = "") {
export function handleUnknownError(e: unknown, ws: WorkerScript | null = null, initialText = "") {
if (e instanceof ScriptDeath) {
//No dialog for an empty ScriptDeath
if (e.errorMessage === "") return;
if (!ws) {
ws = e;
e = ws.errorMessage;
}
// No dialog for ScriptDeath
return;
}
if (ws && typeof e === "string") {
const headerText = basicErrorMessage(ws, "", "");