[IR] Don't wrap KotlinExceptionWithAttachments

#KT-56015 Fixed
This commit is contained in:
Igor Chevdar
2023-01-17 16:46:04 +02:00
committed by Space Team
parent d063db3ce0
commit bd24fc4f0c
@@ -27,6 +27,7 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
import org.jetbrains.kotlin.ir.visitors.acceptVoid
import org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments
interface FileLoweringPass {
fun lower(irFile: IrFile)
@@ -76,6 +77,8 @@ fun FileLoweringPass.lower(
} catch (e: CompilationException) {
e.file = it
throw e
} catch (e: KotlinExceptionWithAttachments) {
throw e
} catch (e: Throwable) {
throw e.wrapWithCompilationException(
"Internal error in file lowering",