KStatsException
Base exception for all errors thrown by the kstats library.
All kstats exceptions extend this class, so catching KStatsException will handle any error originating from the library. The optional cause allows chaining with an underlying throwable.
Example:
try {
doubleArrayOf().mean()
} catch (e: KStatsException) {
println(e.message) // "array must not be empty"
}Content copied to clipboard
Parameters
message
a description of what went wrong.
cause
an optional underlying throwable that caused this exception.