From 884ed45197794b2d5c6c001b12af97d6c92cbcf5 Mon Sep 17 00:00:00 2001 From: Brian Ingles Date: Fri, 27 Oct 2023 13:16:07 -0500 Subject: [PATCH] Added try / catch to MonacoUtils #1599 --- packages/console/src/monaco/MonacoUtils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/console/src/monaco/MonacoUtils.ts b/packages/console/src/monaco/MonacoUtils.ts index 94d373a968..1dca213375 100644 --- a/packages/console/src/monaco/MonacoUtils.ts +++ b/packages/console/src/monaco/MonacoUtils.ts @@ -163,7 +163,14 @@ class MonacoUtils { colors: dhDarkColors, }); - monaco.editor.setTheme('dh-dark'); + try { + monaco.editor.setTheme('dh-dark'); + } catch { + log.error( + `Failed to set 'dh-dark' Monaco theme, falling back to vs-dark` + ); + monaco.editor.setTheme('vs-dark'); + } registerLanguages([DbLang, PyLang, GroovyLang, LogLang, ScalaLang]);