Failure

data class Failure(val errors: List<ConfigError>) : ConfigResult<Nothing> (source)

The config could not be loaded; errors lists each failed key.

Constructors

Link copied to clipboard
constructor(errors: List<ConfigError>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun getOrElse(fallback: Nothing): Nothing

The value, or fallback on failure.

Link copied to clipboard

The value, or null on failure.

Link copied to clipboard

The value, or throws ConfigException with all the errors.

Link copied to clipboard
fun <R> map(transform: (Nothing) -> R): ConfigResult<R>

Transforms the value of a Success; a Failure is returned unchanged.

Link copied to clipboard

Runs action with the errors if this is a Failure, then returns this result.