Out Of Range
class OutOfRange(val path: String, val raw: Number, val min: Double, val max: Double, val fellBackTo: Any? = null) : ConfigError
A numeric value violates the bounds declared by the @Range annotation.
Generated during post-deserialization validation. When the parameter has a Kotlin default value, the deserializer falls back to that default and records the fallback in fellBackTo.
Example:
data class Server(@Range(min = 1.0, max = 65535.0) val port: Int = 8080)Content copied to clipboard
With YAML port: 99999:
OutOfRange(path = "server.port", raw = 99999, min = 1.0, max = 65535.0, fellBackTo = 8080)Content copied to clipboard
Since
1.0
Parameters
path
Dot-separated field path.
raw
The numeric value that was out of range.
min
Lower bound (inclusive).
max
Upper bound (inclusive).
fell Back To
The default value used as a fallback, or null if no fallback was available.