mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
More reliable error message for ScriptDeaths
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user