Skip to main content

moonproof_prover/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ProverError {
5    #[error("Failed to parse ZKIR: {0}")]
6    ZkirParse(String),
7
8    #[error("Proof generation failed: {0}")]
9    Proving(String),
10
11    #[error("Proof verification failed: {0}")]
12    Verification(String),
13
14    #[error("SRS load failed: {0}")]
15    SrsLoad(String),
16
17    #[error("Invalid witness: {0}")]
18    InvalidWitness(String),
19
20    #[error("Deserialization error: {0}")]
21    Deserialization(String),
22
23    #[error("IO error: {0}")]
24    Io(#[from] std::io::Error),
25
26    #[error("Serialization error: {0}")]
27    Serialization(String),
28}