Migrate some FIR/Analysis API KotlinExceptionWithAttachment usages to buildErrorWithAttachment API
This commit is contained in:
committed by
Space Team
parent
24f60a542d
commit
24db4e62f5
+5
-5
@@ -5,14 +5,14 @@
|
||||
|
||||
package org.jetbrains.kotlin.analysis.low.level.api.fir.api
|
||||
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withConeTypeEntry
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withFirEntry
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withFirSymbolEntry
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withConeTypeEntry
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withFirEntry
|
||||
import org.jetbrains.kotlin.fir.utils.exceptions.withFirSymbolEntry
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments
|
||||
import org.jetbrains.kotlin.utils.exceptions.KotlinIllegalArgumentExceptionWithAttachments
|
||||
import org.jetbrains.kotlin.utils.exceptions.buildAttachment
|
||||
import java.util.*
|
||||
import kotlin.reflect.KClass
|
||||
@@ -21,7 +21,7 @@ class InvalidFirElementTypeException(
|
||||
actualFirElement: Any?,
|
||||
ktElement: KtElement?,
|
||||
expectedFirClasses: List<KClass<*>>,
|
||||
) : KotlinExceptionWithAttachments("") {
|
||||
) : KotlinIllegalArgumentExceptionWithAttachments("") {
|
||||
init {
|
||||
buildAttachment {
|
||||
when (actualFirElement) {
|
||||
|
||||
Reference in New Issue
Block a user