setOrError

fun Value.setOrError(key: Value, value: Value)

Sets a value in this value, or throws an error if it cannot be set.

Parameters

key

The key to set.

value

The value to set.

Throws

If the value cannot be set.