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

@@ -279,7 +279,7 @@ export class PerFolderServerInstance implements IServerInstance {
}
private handleConnectionError(error: Error): void {
let action = this.errorHandler.handleError(error);
let action = this.errorHandler.handleError();
if (action === ErrorAction.Shutdown) {
this.notify(this.options.install, localize('jupyterError', "Error sent from Jupyter: {0}", utils.getErrorMessage(error)));
this.stop();
@@ -365,7 +365,7 @@ export class PerFolderServerInstance implements IServerInstance {
class ErrorHandler {
private numErrors: number = 0;
public handleError(error: Error): ErrorAction {
public handleError(): ErrorAction {
this.numErrors++;
return this.numErrors > 3 ? ErrorAction.Shutdown : ErrorAction.Continue;
}