From 31ae64644864257b2375167df56c0b2e3839a9fd Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sat, 8 Feb 2020 21:38:29 +0200 Subject: vscode: add comment on possible UnhandledPromise rejection error --- editors/code/src/inlay_hints.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editors/code/src') diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts index c317a9213..12d7ddf0d 100644 --- a/editors/code/src/inlay_hints.ts +++ b/editors/code/src/inlay_hints.ts @@ -27,7 +27,9 @@ export function activateInlayHints(ctx: Ctx) { ctx.subscriptions ); - ctx.onDidRestart(_ => hintsUpdater.setEnabled(ctx.config.displayInlayHints)); + // We pass async function though it will not be awaited when called, + // thus Promise rejections won't be handled, but this should never throw in fact... + ctx.onDidRestart(async _ => hintsUpdater.setEnabled(ctx.config.displayInlayHints)); } interface InlayHintsParams { -- cgit v1.2.3