OutOfRange

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)

With YAML port: 99999:

OutOfRange(path = "server.port", raw = 99999, min = 1.0, max = 65535.0, fellBackTo = 8080)

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).

fellBackTo

The default value used as a fallback, or null if no fallback was available.

Constructors

Link copied to clipboard
constructor(path: String, raw: Number, min: Double, max: Double, fellBackTo: Any? = null)

Properties

Link copied to clipboard
val fellBackTo: Any? = null
Link copied to clipboard
val max: Double
Link copied to clipboard
Link copied to clipboard
val min: Double
Link copied to clipboard
Link copied to clipboard
val raw: Number