Handle Promise errors caused by cancellation (#2420)

- Port of 34ca4c78b2
- This fixes issues where opening an editor send unhandled errors to the debug console, making it hard to debug issues.
This commit is contained in:
Kevin Cunnane
2018-09-05 14:01:09 -07:00
committed by GitHub
parent ac96919caf
commit b7f4f6af3a
6 changed files with 27 additions and 34 deletions

View File

@@ -27,6 +27,7 @@ import { CodeActionAutoApply, CodeActionFilter, CodeActionKind } from './codeAct
import { CodeActionContextMenu } from './codeActionWidget';
import { LightBulbWidget } from './lightBulbWidget';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { onUnexpectedError } from 'vs/base/common/errors';
function contextKeyForSupportedActions(kind: CodeActionKind) {
return ContextKeyExpr.regex(
@@ -98,7 +99,7 @@ export class QuickFixController implements IEditorContribution {
} else {
this._codeActionContextMenu.show(e.actions, e.position);
}
});
}).catch(onUnexpectedError);
return;
}