binius_core/oracle/
error.rs1use crate::oracle::OracleId;
4
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[error("the number of variables of the composition polynomial does not match the number of composed polynomials")]
8 CompositionMismatch,
9 #[error("expected the start index to be at most {expected}")]
10 InvalidStartIndex { expected: usize },
11 #[error("expected the nonzero index to be at most {expected}")]
12 InvalidNonzeroIndex { expected: usize },
13 #[error("expected the polynomial to have {expected} variables")]
14 IncorrectNumberOfVariables { expected: usize },
15 #[error("attempted to project more variables {values_len} than inner polynomial has {n_vars}")]
16 InvalidProjection { values_len: usize, n_vars: usize },
17 #[error("invalid polynomial index in committed batch")]
18 InvalidPolynomialIndex,
19 #[error("polynomial error")]
20 Polynomial(#[from] crate::polynomial::Error),
21 #[error(
22 "n_vars ({n_vars}) must be at least as big as the requested log_degree ({log_degree})"
23 )]
24 NotEnoughVarsForPacking { n_vars: usize, log_degree: usize },
25 #[error("no oracle exists in this MultilinearOracleSet with id {0}")]
26 InvalidOracleId(OracleId),
27 #[error("tower_level ({tower_level}) exceeds maximum")]
28 TowerLevelTooHigh { tower_level: usize },
29 #[error("constraint set is empty")]
30 EmptyConstraintSet,
31 #[error("expected constraint set to contain only constraints with n_vars={expected}, but found n_vars={got}")]
32 ConstraintSetNvarsMismatch { got: usize, expected: usize },
33}