Skip to content

Commit f1379c8

Browse files
committed
fix: revert to previous behaviour of silent fallback if no hover region
1 parent 04d58c9 commit f1379c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover/LSPTextHover.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ public class LSPTextHover implements ITextHover, ITextHoverExtension, ITextHover
170170
int regionEndOffset = Math.min(document.getLength(),
171171
LSPEclipseUtils.toOffset(range.getEnd(), document));
172172
return this.lastRegion = new Region(regionStartOffset, regionEndOffset - regionStartOffset);
173-
} catch (ExecutionException | NoSuchElementException | BadLocationException e) {
173+
} catch (ExecutionException | BadLocationException e) {
174174
LanguageServerPlugin.logError("Cannot get hover region for offset " + offset, e); //$NON-NLS-1$
175175
} catch (InterruptedException e) {
176176
Thread.currentThread().interrupt();
177-
} catch (TimeoutException e) {
177+
} catch (NoSuchElementException | TimeoutException e) {
178178
// Fallback to heuristic region without blocking.
179179
}
180180

0 commit comments

Comments
 (0)