diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java index 370fabdb6c93..693c3d118ca2 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -401,7 +401,13 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp InspectionToolPresentation toolPresentation = getPresentation(toolWrapper); try { if (tool.isGraphNeeded()) { - ((RefManagerImpl)getRefManager()).findAllDeclarations(); + try { + ((RefManagerImpl)getRefManager()).findAllDeclarations(); + } + catch (Throwable e) { + getStdJobDescriptors().BUILD_GRAPH.setDoneAmount(0); + throw e; + } } tool.runInspection(scope, inspectionManager, this, toolPresentation); if (tool.queryExternalUsagesRequests(inspectionManager, this, toolPresentation)) {