From 3e5f59bacffc5f421bedb043a1d4e849540beab2 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 19 Nov 2015 16:57:25 +0100 Subject: [PATCH] Fix for Promise without error handling when failing to connect to extension --- src/vs/workbench/parts/debug/browser/debugService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugService.ts b/src/vs/workbench/parts/debug/browser/debugService.ts index 1dc051e1d94..f111cd31e9a 100644 --- a/src/vs/workbench/parts/debug/browser/debugService.ts +++ b/src/vs/workbench/parts/debug/browser/debugService.ts @@ -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); } }));