getOrThrow

fun <V : Any> getOrThrow(paramType: ContextParamType<V>): V

Returns the value of the given paramType or throws an exception if it is not present and also couldn't be resolved through autofillers.

Throws

If the given paramType is an optional parameter that is not present.

If the given paramType is not allowed under this context's intention.