mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 22:22:26 +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);
|
||||
}
|
||||
|
||||
if (!initialText) {
|
||||
if (e instanceof ScriptDeath) initialText = `${e.name}@${e.hostname} (PID - ${e.pid})\n\n`;
|
||||
if (!initialText && e instanceof ScriptDeath) {
|
||||
const basicHeader = `ERROR\n${e.name}@${e.hostname} (PID - ${e.pid})\n\n`;
|
||||
if (e.errorMessage.includes(basicHeader)) initialText = basicHeader;
|
||||
}
|
||||
|
||||
dialogBoxCreate(initialText + errorText);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user