Skip to content

Commit 727b36c

Browse files
committed
Replace assert with check to throw exceptions without jvm flag #131
1 parent d7ada57 commit 727b36c

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/append.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.jetbrains.kotlinx.dataframe.nrow
1010

1111
public fun <T> DataFrame<T>.append(vararg values: Any?): DataFrame<T> {
1212
val ncol = ncol
13-
assert(values.size % ncol == 0) { "Invalid number of arguments. Multiple of $ncol is expected, but actual was: ${values.size}" }
13+
check(values.size % ncol == 0) { "Invalid number of arguments. Multiple of $ncol is expected, but actual was: ${values.size}" }
1414
val newRows = values.size / ncol
1515
return columns().mapIndexed { colIndex, col ->
1616
val newValues = (0 until newRows).map { values[colIndex + it * ncol] }

0 commit comments

Comments
 (0)