propaga_core/error.rs
1use crate::VariableId;
2use thiserror::Error;
3
4/// Errors returned by the propagation engine.
5#[derive(Debug, Error, PartialEq, Eq)]
6pub enum PropagaError {
7 /// A variable domain became empty during propagation.
8 #[error("domain of variable {0:?} is empty")]
9 DomainEmpty(VariableId),
10
11 /// A variable handle does not exist in the engine.
12 #[error("unknown variable {0:?}")]
13 UnknownVariable(VariableId),
14
15 /// A propagator handle does not exist in the engine.
16 #[error("unknown propagator")]
17 UnknownPropagator,
18}