Skip to content

Commit cab4f38

Browse files
committed
Recover when 'documentPaste' API is not properly registered.
Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
1 parent 90477f8 commit cab4f38

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/standardLanguageClient.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ export class StandardLanguageClient {
128128
await onExtensionChange(extensions.all);
129129
});
130130
}
131-
132-
registerPasteEventHandler(context, this.languageClient);
131+
try {
132+
registerPasteEventHandler(context, this.languageClient);
133+
} catch (error) {
134+
// clients may not have properly configured documentPaste
135+
logger.error(error);
136+
}
133137
activationProgressNotification.hide();
134138
if (!hasImported) {
135139
showImportFinishNotification(context);

0 commit comments

Comments
 (0)