use thiserror::Error;
#[derive(Debug, Error)]
pub enum ProofError {
#[error("constraint system error: {0}")]
ConstraintError(String),
#[error("proof generation failed: {0}")]
ProofGenerationFailed(String),
#[error("proof verification failed: {0}")]
VerificationFailed(String),
#[error("invalid proof format: {0}")]
InvalidProofFormat(String),
#[error("setup error: {0}")]
SetupError(String),
#[error("invalid witness: {0}")]
InvalidWitness(String),
#[error("deserialization error: {0}")]
DeserializationError(String),
#[error(
"exo-proofs is unaudited (pedagogical implementation). \
Callers must opt in with the 'unaudited-pedagogical-proofs' \
Cargo feature before {api} will execute. \
Do NOT enable this flag in production."
)]
UnauditedImplementation {
api: &'static str,
},
}
pub type Result<T> = std::result::Result<T, ProofError>;