Skip to content

Commit

Permalink
fix(demo): register error handle in non-workbench demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Oct 17, 2024
1 parent bdc5bf9 commit 5523319
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demo/src/setup.views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import getViewsServiceOverride, {
onDidChangeSideBarPosition,
Position
} from '@codingame/monaco-vscode-views-service-override'
import { setUnexpectedErrorHandler } from 'vscode/monaco'
import { openNewCodeEditor } from './features/editor'
import './features/customView.views'
import {
Expand Down Expand Up @@ -92,6 +93,11 @@ await initializeMonacoService(
envOptions
)

setUnexpectedErrorHandler((e) => {
// eslint-disable-next-line no-console
console.info('Unexpected error', e)
})

for (const config of [
{ part: Parts.TITLEBAR_PART, element: '#titleBar' },
{ part: Parts.BANNER_PART, element: '#banner' },
Expand Down

0 comments on commit 5523319

Please sign in to comment.