diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover/LSPTextHover.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover/LSPTextHover.java index c5216f228..0122b33c3 100644 --- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover/LSPTextHover.java +++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover/LSPTextHover.java @@ -170,11 +170,11 @@ public class LSPTextHover implements ITextHover, ITextHoverExtension, ITextHover int regionEndOffset = Math.min(document.getLength(), LSPEclipseUtils.toOffset(range.getEnd(), document)); return this.lastRegion = new Region(regionStartOffset, regionEndOffset - regionStartOffset); - } catch (ExecutionException | NoSuchElementException | BadLocationException e) { + } catch (ExecutionException | BadLocationException e) { LanguageServerPlugin.logError("Cannot get hover region for offset " + offset, e); //$NON-NLS-1$ } catch (InterruptedException e) { Thread.currentThread().interrupt(); - } catch (TimeoutException e) { + } catch (NoSuchElementException | TimeoutException e) { // Fallback to heuristic region without blocking. }