mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
More reliable error message for ScriptDeaths
This commit is contained in:
parent
ad356cf28f
commit
caf1a99c1d
@ -23,9 +23,9 @@ export function errorDialog(e: unknown, initialText = "") {
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!initialText) {
|
if (!initialText && e instanceof ScriptDeath) {
|
||||||
if (e instanceof ScriptDeath) initialText = `${e.name}@${e.hostname} (PID - ${e.pid})\n\n`;
|
const basicHeader = `ERROR\n${e.name}@${e.hostname} (PID - ${e.pid})\n\n`;
|
||||||
|
if (e.errorMessage.includes(basicHeader)) initialText = basicHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialogBoxCreate(initialText + errorText);
|
dialogBoxCreate(initialText + errorText);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user