Skip to content

Commit bfe2400

Browse files
committed
Handle KotlinReflectionInternalError properly
1 parent 24b8cc1 commit bfe2400

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jupyter-lib/api/src/main/kotlin/org/jetbrains/kotlinx/jupyter/api/renderersHandling.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable
44
import org.jetbrains.kotlinx.jupyter.api.libraries.ExecutionHost
55
import org.jetbrains.kotlinx.jupyter.api.libraries.VariablesSubstitutionAware
66
import org.jetbrains.kotlinx.jupyter.util.TypeHandlerCodeExecutionSerializer
7+
import kotlin.reflect.jvm.internal.KotlinReflectionInternalError
78
import kotlin.reflect.KClass
89
import kotlin.reflect.full.isSubclassOf
910

@@ -139,6 +140,8 @@ class SubtypeRendererTypeHandler(private val superType: KClass<*>, override val
139140
type.isSubclassOf(superType)
140141
} catch (e: UnsupportedOperationException) {
141142
false
143+
} catch (e: KotlinReflectionInternalError) {
144+
false
142145
}
143146
}
144147

0 commit comments

Comments
 (0)