Use notebookUtils.getErrorMessage to get the correct msg instead of showing {0} (#5012)

This commit is contained in:
Yurong He
2019-04-12 11:50:44 -07:00
committed by GitHub
parent 11e4b743e0
commit 51851efda5

View File

@@ -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();