Skip to content

Commit

Permalink
Added try / catch to MonacoUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Oct 27, 2023
1 parent a2aec75 commit 884ed45
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/console/src/monaco/MonacoUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit 884ed45

Please sign in to comment.