From 51851efda5f9759afd34d259cdb2fef3cf272199 Mon Sep 17 00:00:00 2001 From: Yurong He <43652751+YurongHe@users.noreply.github.com> Date: Fri, 12 Apr 2019 11:50:44 -0700 Subject: [PATCH] Use notebookUtils.getErrorMessage to get the correct msg instead of showing {0} (#5012) --- src/sql/workbench/parts/notebook/models/notebookModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/parts/notebook/models/notebookModel.ts b/src/sql/workbench/parts/notebook/models/notebookModel.ts index d616168fda..b46c621767 100644 --- a/src/sql/workbench/parts/notebook/models/notebookModel.ts +++ b/src/sql/workbench/parts/notebook/models/notebookModel.ts @@ -777,7 +777,7 @@ export class NotebookModel extends Disposable implements INotebookModel { } await this.shutdownActiveSession(); } catch (err) { - this.notifyError(localize('shutdownError', "An error occurred when closing the notebook: {0}", err)); + this.notifyError(localize('shutdownError', "An error occurred when closing the notebook: {0}", notebookUtils.getErrorMessage(err))); } } @@ -787,7 +787,7 @@ export class NotebookModel extends Disposable implements INotebookModel { await this._activeClientSession.ready; } catch (err) { - this.notifyError(localize('shutdownClientSessionError', "A client session error occurred when closing the notebook: {0}", err)); + this.notifyError(localize('shutdownClientSessionError', "A client session error occurred when closing the notebook: {0}", notebookUtils.getErrorMessage(err))); } await this._activeClientSession.shutdown(); this.clearClientSessionListeners();