use thiserror::Error;
#[derive(Debug, Error)]
pub enum ObjectiveError {
#[error("No candidates available")]
NoCandidates,
#[error("No candidate met criteria: {0}")]
NoMatch(String),
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
#[error("Objective not found: {0}")]
NotFound(String),
#[error("Scoring error: {0}")]
Scoring(String),
#[error("Fold error: {0}")]
Fold(#[from] crate::FoldError),
}
pub type ObjectiveResult<T> = Result<T, ObjectiveError>;
#[cfg(test)]
#[path = "error_tests.rs"]
mod tests;