rethrow PCE (EA-101552 - PCE: AbstractProgressIndicatorBase.checkCanceled)

This commit is contained in:
peter
2017-06-06 16:39:26 +02:00
parent 2234ca6721
commit 5f6ffaa7c6

View File

@@ -17,6 +17,7 @@ package com.intellij.codeInspection.dataFlow
import com.intellij.lang.LighterAST
import com.intellij.lang.LighterASTNode
import com.intellij.openapi.progress.ProcessCanceledException
import com.intellij.psi.impl.source.JavaLightStubBuilder
import com.intellij.psi.impl.source.PsiFileImpl
import com.intellij.psi.impl.source.PsiMethodImpl
@@ -99,6 +100,8 @@ private fun methodIndex(method: PsiMethodImpl): Int {
val file = method.containingFile as PsiFileImpl
val stubTree = try {
file.stubTree ?: file.calcStubTree()
} catch (e: ProcessCanceledException) {
throw e
} catch (e: RuntimeException) {
throw RuntimeException("While inferring contract for " + PsiUtil.getMemberQualifiedName(method), e)
}