use crate::id::GraphNodeId;
#[derive(Debug, thiserror::Error)]
pub enum GraphAnalysisError {
#[error("node {} is not in this graph", node.index())]
UnknownNode {
node: GraphNodeId,
},
#[error("the graph states {count} nodes, above the ceiling of {limit}")]
NodeLimitExceeded {
count: u32,
limit: u32,
},
#[error("the selection admits {count} edges, above the ceiling of {limit}")]
SelectedEdgeLimitExceeded {
count: u32,
limit: u32,
},
#[error("a depth of {requested} is above the ceiling of {limit}")]
DepthLimitExceeded {
requested: u32,
limit: u32,
},
#[error("betweenness needs {required} steps, above the ceiling of {limit}")]
BetweennessWorkLimitExceeded {
required: u64,
limit: u64,
},
#[error("the betweenness work bound overflows its own counter")]
BetweennessWorkOverflow,
#[error("node {} is owned by no container", node.index())]
ConsumedGraphInvariant {
node: GraphNodeId,
},
}