mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
Ignore monaco cancellation errors (#208)
Also updated monaco-editor and @monaco-editor/react to latest versions since there were no conflicts.
This commit is contained in:
@@ -750,6 +750,8 @@ export function handleUnknownError(e: unknown, ws: WorkerScript | ScriptDeath |
|
||||
const msg = `${e.message} (sorry we can't be more helpful)`;
|
||||
e = ws ? makeBasicErrorMsg(ws, msg, "SYNTAX") : `SYNTAX ERROR:\n\n${msg}`;
|
||||
} else if (e instanceof Error) {
|
||||
// Ignore any cancellation errors from Monaco that get here
|
||||
if (e.name === "Canceled" && e.message === "Canceled") return;
|
||||
const msg = `${e.message}${e.stack ? `\nstack:\n${e.stack.toString()}` : ""}`;
|
||||
e = ws ? makeBasicErrorMsg(ws, msg) : `RUNTIME ERROR:\n\n${msg}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user