Skip to content

Commit

Permalink
LSP Client: Log exception from documentation query, but don't raise u…
Browse files Browse the repository at this point in the history
…ser visible error bubble
  • Loading branch information
matthiasblaesing committed Oct 9, 2024
1 parent 321a543 commit 16ce7f1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.ImageIcon;
Expand Down Expand Up @@ -80,6 +82,8 @@
@MimeRegistration(mimeType="", service=CompletionProvider.class)
public class CompletionProviderImpl implements CompletionProvider {

private static final Logger LOG = Logger.getLogger(CompletionProviderImpl.class.getName());

@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
if ((queryType & TOOLTIP_QUERY_TYPE) != 0) {
Expand Down Expand Up @@ -269,7 +273,7 @@ protected void query(CompletionResultSet resultSet, Document doc, int caretOffse
try {
temp = server.getTextDocumentService().resolveCompletionItem(i).get();
} catch (InterruptedException | ExecutionException ex) {
Exceptions.printStackTrace(ex);
LOG.log(Level.INFO, "Failed to retrieve documentation data", ex);
temp = i;
}
resolved = temp;
Expand Down

0 comments on commit 16ce7f1

Please sign in to comment.