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
|
||||
|
||||
import com.intellij.openapi.progress.ProcessCanceledException
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtVisitorVoid
|
||||
@@ -29,9 +30,14 @@ class ExceptionWrappingKtVisitorVoid(private val delegate: KtVisitorVoid) : KtVi
|
||||
override fun visitDeclaration(dcl: KtDeclaration) {
|
||||
try {
|
||||
dcl.accept(delegate)
|
||||
} catch (e: KotlinFrontEndException) {
|
||||
}
|
||||
catch (e: ProcessCanceledException) {
|
||||
throw e
|
||||
} catch (t: Throwable) {
|
||||
}
|
||||
catch (e: KotlinFrontEndException) {
|
||||
throw e
|
||||
}
|
||||
catch (t: Throwable) {
|
||||
throw KotlinFrontEndException("Failed to analyze declaration ${dcl.name}", t, dcl)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user