Notebook Extension: First logging improvements (#13729)

* First logging improvements

* PR feedback for err output
This commit is contained in:
Chris LaFreniere
2020-12-11 11:21:06 -08:00
committed by GitHub
parent 2df67c4f78
commit a5231ec0e5
12 changed files with 28 additions and 20 deletions

View File

@@ -184,7 +184,7 @@ export class JupyterSession implements nb.ISession {
skipSettingEnvironmentVars?: boolean,
private _pythonEnvVarPath?: string) {
this.setEnvironmentVars(skipSettingEnvironmentVars).catch(error => {
console.error(`Unexpected exception setting Jupyter Session variables : ${error}`);
console.error('Unexpected exception setting Jupyter Session variables : ', error);
// We don't want callers to hang forever waiting - it's better to continue on even if we weren't
// able to set environment variables
this._messagesComplete.resolve();
@@ -240,7 +240,7 @@ export class JupyterSession implements nb.ISession {
await this._installation.promptForPythonInstall(kernelInfo.display_name);
} catch (err) {
// Have to swallow the error here to prevent hangs when changing back to the old kernel.
console.error(err.toString());
console.error('Exception encountered prompting for Python install', err);
return this._kernel;
}
}