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}")
}Content copied to clipboard
Parameters
propertyId
The name/identifier of the property that was not found