binius_hal/
error.rs

1// Copyright 2024-2025 Irreducible Inc.
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5	/// Generic variant to represent Errors from concrete ComputationBackends.
6	#[error("Backend error: {0}")]
7	BackendError(Box<dyn std::error::Error + Send + Sync>),
8	#[error("Zerocheck CPU Handler error: {0}")]
9	ZerocheckCpuHandlerError(Box<dyn std::error::Error + Send + Sync>),
10	#[error("{0}")]
11	MathError(#[from] binius_math::Error),
12	#[error("the query must have size {expected}")]
13	IncorrectQuerySize { expected: usize },
14	#[error("provided nontrivial evaluation points are of incorrect length")]
15	IncorrectNontrivialEvalPointsLength,
16	#[error("scratch space not provided")]
17	NoScratchSpace,
18	#[error("incorrect multilinear access destination slice lengths")]
19	IncorrectDestSliceLengths,
20	#[error("{0}")]
21	FieldError(#[from] binius_field::Error),
22}