use core::fmt;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ProverError {
UnsatisfiedTransitionConstraintError(usize),
MismatchedConstraintPolynomialDegree(usize, usize),
UnsupportedFieldExtension(usize),
}
impl fmt::Display for ProverError {
#[rustfmt::skip]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::UnsatisfiedTransitionConstraintError(step) => {
write!(f, "a transition constraint was not satisfied at step {step}")
}
Self::MismatchedConstraintPolynomialDegree(expected, actual) => {
write!(f, "the constraint polynomial's components do not all have the same degree; expected {expected}, but was {actual}")
}
Self::UnsupportedFieldExtension(degree) => {
write!(f, "field extension of degree {degree} is not supported for the specified base field")
}
}
}
}
impl core::error::Error for ProverError {}