PropertyNotFoundException

Thrown when attempting to retrieve a property that does not exist on a feature.

This exception is thrown by Feature.getProperty() when the requested property name is not found in the feature's custom properties map.

To avoid this exception, check if the property exists before retrieving it by inspecting Feature.customProperties or using the Feature.propertyNames extension property.

Example:

val feature = Feature(uid = "my-feature")

// Safe approach - check existence first
if ("maxRetries" in feature.propertyNames) {
val property = feature.getProperty<Int>("maxRetries")
}

// Or handle the exception
try {
val property = feature.getProperty<Int>("maxRetries")
} catch (e: PropertyNotFoundException) {
logger.warn("Property not found: ${e.message}")
}

Parameters

propertyId

The name/identifier of the property that was not found

See also

Constructors

Link copied to clipboard
constructor(propertyId: String)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?