From 8be3e902a8bd83bb1a0a753aed18b5ae1d39314a Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 10 Oct 2018 17:10:14 +0200 Subject: [PATCH] ResolutionFacadeWithDebugInfo: do not wrap index not ready exception Fixes problems where `catch (IndexNotReadyException)` blocks in IDEA code would not work --- .../kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt index 0a6d57c2dc8..85b306f61a0 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt @@ -94,7 +94,7 @@ private class ResolutionFacadeWithDebugInfo( try { return body() } catch (e: Throwable) { - if (e is ControlFlowException) { + if (e is ControlFlowException || e is IndexNotReadyException) { throw e } throw KotlinIdeaResolutionException(e, resolvingWhat(), creationPlace)