use thiserror::Error;
pub type Result<T> = std::result::Result<T, OptimizationError>;
#[derive(Debug, Error)]
pub enum OptimizationError {
#[error("Graph must contain at least one node")]
EmptyGraph,
#[error("Graph must contain at least one edge")]
NoEdges,
#[error("Start node {0} not found in graph")]
StartNodeNotFound(i64),
#[error("Graph is not connected - cannot create Eulerian circuit")]
DisconnectedGraph,
#[error("Invalid edge: {0}")]
InvalidEdge(String),
#[error("Graph has {0} odd-degree vertices (maximum supported: 100)")]
TooManyOddVertices(usize),
#[error("Failed to make graph Eulerian: {0}")]
AugmentationFailed(String),
#[error("Failed to construct Eulerian circuit: {0}")]
CircuitConstructionFailed(String),
}