From c94daa81ff3a6d62c6b48b7903a2d6ce51e4fb24 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Wed, 21 Aug 2013 19:53:52 +0400 Subject: [PATCH] build graph: cleanup done amount if exception is thrown and logged (IDEA-112290) --- .../codeInspection/ex/GlobalInspectionContextImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)) {