Skip to content

Commit 780b61f

Browse files
committed
tiny error rewrite
1 parent c54fcd5 commit 780b61f

File tree

2 files changed

+4
-4
lines changed
  • dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io
  • dataframe-excel/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io

2 files changed

+4
-4
lines changed

dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/writeDelim.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ internal fun writeDelimImpl(
6262
it.toJson()
6363
} catch (_: NoClassDefFoundError) {
6464
error(
65-
"Encountered a DataFrame when writing to csv/tsv/delim. This needs to be converted to JSON, so the dataframe-json dependency is required.",
65+
"Encountered a DataRow value when writing to csv/tsv/delim. It must be serialized to JSON, requiring the 'dataframe-json' dependency.",
6666
)
6767
}
6868

6969
is AnyFrame -> try {
7070
it.toJson()
7171
} catch (_: NoClassDefFoundError) {
7272
error(
73-
"Encountered a DataRow when writing to csv/tsv/delim. This needs to be converted to JSON, so the dataframe-json dependency is required.",
73+
"Encountered a DataFrame value when writing to csv/tsv/delim. It must be serialized to JSON, requiring the 'dataframe-json' dependency.",
7474
)
7575
}
7676

dataframe-excel/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/xlsx.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ private fun Cell.setCellValueByGuessedType(any: Any) =
673673
any.toJson()
674674
} catch (_: NoClassDefFoundError) {
675675
error(
676-
"Encountered a DataRow when writing to an Excel cell. This needs to be converted to JSON, so the dataframe-json dependency is required.",
676+
"Encountered a DataRow value when writing to an Excel cell. It must be serialized to JSON, requiring the 'dataframe-json' dependency.",
677677
)
678678
},
679679
)
@@ -683,7 +683,7 @@ private fun Cell.setCellValueByGuessedType(any: Any) =
683683
any.toJson()
684684
} catch (_: NoClassDefFoundError) {
685685
error(
686-
"Encountered a DataFrame when writing to an Excel cell. This needs to be converted to JSON, so the dataframe-json dependency is required.",
686+
"Encountered a DataFrame value when writing to an Excel cell. It must be serialized to JSON, requiring the 'dataframe-json' dependency.",
687687
)
688688
},
689689
)

0 commit comments

Comments
 (0)