Fix for Promise without error handling when failing to connect to extension

This commit is contained in:
isidor
2015-11-19 16:57:25 +01:00
parent b853633084
commit 3e5f59bacf

View File

@@ -188,8 +188,8 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
private registerSessionListeners(): void {
this.toDispose.push(this.session.addListener2(debug.SessionEvents.INITIALIZED, (event: DebugProtocol.InitializedEvent) => {
this.sendAllBreakpoints();
this.sendExceptionBreakpoints();
this.sendAllBreakpoints().done(null, errors.onUnexpectedError);
this.sendExceptionBreakpoints().done(null, errors.onUnexpectedError);
}));
this.toDispose.push(this.session.addListener2(debug.SessionEvents.STOPPED, (event: DebugProtocol.StoppedEvent) => {
@@ -239,9 +239,9 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
let extensionHostData = event.body ? event.body.extensionHost : undefined;
if (extensionHostData) {
this.restartSession(extensionHostData);
this.restartSession(extensionHostData).done(null, errors.onUnexpectedError);
} else if (this.session) {
this.session.stop();
this.session.stop().done(null, errors.onUnexpectedError);
}
}));