ControlUpdateException

class ControlUpdateException(message: String, val controlKey: String, val attemptedValue: String, cause: Throwable? = null) : RuntimeException(source)

Thrown when a JsonControlIfc or StringControlIfc cannot apply an incoming value.

For JSON controls this occurs when the incoming string is structurally invalid JSON or cannot be deserialized into the property's declared Kotlin type. When thrown from inside JsonControl, the underlying property has already been silently reverted to its safe JsonControlIfc.initialJsonValue before this exception propagates.

For string controls this occurs when allowedValues is non-empty and the supplied value is not a member of that set.

The batch-import function in Controls catches ControlUpdateException per control, records each failure in a ControlImportResult, and continues processing the remaining controls rather than aborting the entire import.

Parameters

message

human-readable description of the failure

controlKey

the ControlIfc.keyName of the control that failed

attemptedValue

the raw string value that triggered the failure

cause

the underlying exception (e.g. SerializationException), or null if there is none

Constructors

Link copied to clipboard
constructor(message: String, controlKey: String, attemptedValue: String, cause: Throwable? = null)

Properties

Link copied to clipboard
Link copied to clipboard