Skip to content

Commit 8e9302c

Browse files
committed
added catch for when users have a too old version for setMinimalKernelVersion()
1 parent 1e3e348 commit 8e9302c

File tree

1 file changed

+8
-1
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter

1 file changed

+8
-1
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/Integration.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ internal class Integration(
6666
) : JupyterIntegration() {
6767

6868
override fun Builder.onLoaded() {
69-
setMinimalKernelVersion(MIN_KERNEL_VERSION)
69+
try {
70+
setMinimalKernelVersion(MIN_KERNEL_VERSION)
71+
} catch (_: NoSuchMethodError) { // will be thrown on version < 0.11.0.198
72+
throw IllegalStateException(
73+
"Your Kotlin Jupyter kernel version appears to be out of date (version ${notebook.kernelVersion}). " +
74+
"Please update to version $MIN_KERNEL_VERSION or higher to be able to use DataFrame."
75+
)
76+
}
7077
val codeGen = ReplCodeGenerator.create()
7178
val config = JupyterConfiguration()
7279

0 commit comments

Comments
 (0)