getOrThrow

abstract suspend fun getOrThrow(featureId: String): Feature(source)

Read a feature from the store or throw an exception if not found.

Unlike the get operator which returns null for missing features, this method throws a FeatureNotFoundException, making it useful when the feature must exist.

Example:

val feature = store.getOrThrow("my-feature") // Throws if not found

Return

Feature if found

Parameters

featureId

Feature unique identifier

Throws

if feature doesn't exist