Error Handler With
interface ErrorHandlerWith
Interface for handling null or blank field values during configuration loading.
The handle method is invoked during validation or loading, allowing the handler to log, throw, mutate state, or even silently recover from the missing value.
Example:
class PanicIfNull : ErrorHandlerWith {
override fun handle(fieldValue: Any?) {
throw IllegalStateException("Field was unexpectedly null: $fieldValue")
}
}Content copied to clipboard