/// Controls what the feature registry does when [`OptionalSection::validate_enabled`]
/// returns an error for an otherwise-enabled section.
///
/// [`OptionalSection::validate_enabled`]: crate::OptionalSection::validate_enabled
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum OnError {
/// Propagate the error -- startup halts immediately. This is the default.
#[default]
Fail,
/// Treat the feature as disabled and continue startup.
///
/// The validation error reason is recorded in [`crate::FeatureRecord::override_source`]
/// as [`crate::OverrideSource::ValidationError`] so operators can inspect it in the
/// startup summary without crashing the service.
Disable,
}