From f0bc5f4ed6f95ccb1a649463d5db388956d79859 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 26 Oct 2022 11:15:28 -0700 Subject: [PATCH] Re #164715. Better error handling of notebook opening --- src/vs/workbench/contrib/notebook/browser/notebookEditor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts index cb5594032533e..ebf0e908fa4be 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditor.ts @@ -290,7 +290,8 @@ export class NotebookEditor extends EditorPane implements IEditorPaneWithSelecti } } } catch (e) { - const error = createErrorWithActions(e instanceof Error ? e : new Error(e.message), [ + console.warn(e); + const error = createErrorWithActions(e instanceof Error ? e : new Error((e ? e.message : '')), [ toAction({ id: 'workbench.notebook.action.openInTextEditor', label: localize('notebookOpenInTextEditor', "Open in Text Editor"), run: async () => { const activeEditorPane = this._editorService.activeEditorPane;