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:
Snarling
2022-11-10 10:08:59 -05:00
committed by GitHub
parent 3ec4f0c98c
commit 82ba5f1f13
3 changed files with 28 additions and 26 deletions
+2
View File
@@ -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}`;
}