From ef0b200d22ec0d82f29f5252a7948243d30f379f Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 21 Jan 2016 19:30:19 +0100 Subject: [PATCH] handle exceptions during find usages and continue --- .../psi/impl/search/PsiSearchHelperImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java b/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java index c095258d7a20..7945b665f7c1 100644 --- a/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java +++ b/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java @@ -758,7 +758,17 @@ public class PsiSearchHelperImpl implements PsiSearchHelper { public boolean execute(@NotNull PsiElement element, int offsetInElement) { if (ignoreInjectedPsi && element instanceof PsiLanguageInjectionHost) return true; - return wrapped.processTextOccurrence(element, offsetInElement, consumer); + try { + return wrapped.processTextOccurrence(element, offsetInElement, consumer); + } + catch (Exception e) { + LOG.error(e); + return true; + } + catch (Error e) { + LOG.error(e); + return true; + } } @Override