ConversionFailed

class ConversionFailed(val key: String, val rawValue: String, val targetType: String, val cause: String) : ConfigError(source)

The value for key could not be converted to the field's type.

Constructors

Link copied to clipboard
constructor(key: String, rawValue: String, targetType: String, cause: String)

Properties

Link copied to clipboard

The converter's exception message (unknown if it had none), or invalid value for a @Secret field. A string, not the exception itself.

Link copied to clipboard
open override val key: String

The key that failed, as looked up in the source that supplied the value. For a missing key it is the SCREAMING_SNAKE form (or the @Key name). For a failed init check it is the spec's prefix, such as DATABASE for a nested spec, or the class name when there is none.

Link copied to clipboard
open override val message: String

A readable description of the problem, used in ConfigException's message.

Link copied to clipboard

The text read from the source, or *** for a @Secret field.

Link copied to clipboard

The field's type as written in the spec, e.g. Int or List<Duration>.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String