Skip to content

Commit

Permalink
fix: avoid polluting logs with ProcessCanceledException stacktraces o…
Browse files Browse the repository at this point in the history
…n Ctrl+hover

Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon committed Jul 7, 2023
1 parent 44f2f2c commit d166974
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private LanguageServiceAccessor(Project project) {
this.project = project;
}

private Set<LanguageServerWrapper> startedServers = new HashSet<>();
private final Set<LanguageServerWrapper> startedServers = new HashSet<>();
private Map<StreamConnectionProvider, LanguageServersRegistry.LanguageServerDefinition> providersToLSDefinitions = new HashMap<>();

/**
Expand Down Expand Up @@ -351,6 +351,8 @@ private Collection<LanguageServerWrapper> getLSWrappers(@Nonnull Document docume
.filter(wrapper -> {
try {
return wrapper.isConnectedTo(path) || LanguageServersRegistry.getInstance().matches(document, wrapper.serverDefinition, project);
} catch (ProcessCanceledException cancellation) {
throw cancellation;
} catch (Exception e) {
LOGGER.warn(e.getLocalizedMessage(), e);
return false;
Expand Down

0 comments on commit d166974

Please sign in to comment.