Stop wrapping ProcessCanceledException into KotlinFrontEndException (EA-86153)
(cherry picked from commit 0ec664b)
This commit is contained in:
committed by
Nikolay Krasko
parent
a30d0d0f1e
commit
b76ae9b35d
+8
-2
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.resolve
|
package org.jetbrains.kotlin.resolve
|
||||||
|
|
||||||
|
import com.intellij.openapi.progress.ProcessCanceledException
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||||
import org.jetbrains.kotlin.psi.KtVisitorVoid
|
import org.jetbrains.kotlin.psi.KtVisitorVoid
|
||||||
@@ -29,9 +30,14 @@ class ExceptionWrappingKtVisitorVoid(private val delegate: KtVisitorVoid) : KtVi
|
|||||||
override fun visitDeclaration(dcl: KtDeclaration) {
|
override fun visitDeclaration(dcl: KtDeclaration) {
|
||||||
try {
|
try {
|
||||||
dcl.accept(delegate)
|
dcl.accept(delegate)
|
||||||
} catch (e: KotlinFrontEndException) {
|
}
|
||||||
|
catch (e: ProcessCanceledException) {
|
||||||
throw e
|
throw e
|
||||||
} catch (t: Throwable) {
|
}
|
||||||
|
catch (e: KotlinFrontEndException) {
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
catch (t: Throwable) {
|
||||||
throw KotlinFrontEndException("Failed to analyze declaration ${dcl.name}", t, dcl)
|
throw KotlinFrontEndException("Failed to analyze declaration ${dcl.name}", t, dcl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user