dory_pcs/
error.rs

1/// Errors that can occur in Dory PCS operations
2#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
3pub enum DoryError {
4    /// The proof verification failed
5    #[error("Invalid proof")]
6    InvalidProof,
7
8    /// Polynomial size is invalid for the given parameters
9    #[error("Invalid polynomial size: expected {expected}, got {actual}")]
10    InvalidSize {
11        /// Expected size
12        expected: usize,
13        /// Actual size
14        actual: usize,
15    },
16
17    /// Evaluation point has wrong dimension
18    #[error("Invalid evaluation point dimension: expected {expected}, got {actual}")]
19    InvalidPointDimension {
20        /// Expected dimension
21        expected: usize,
22        /// Actual dimension
23        actual: usize,
24    },
25
26    /// Invalid input parameters
27    #[error("Invalid input: {0}")]
28    InvalidInput(String),
29
30    /// Setup file not found or corrupted
31    #[error("Invalid or missing URS file: {0}")]
32    InvalidURS(String),
33}