Files
dusk_plonk
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
//! Errors related to the proof_system module.

use failure::Error;
/// Defines all of the possible ProofError types that we could have when
/// we are working with the `proof_system` module.
#[derive(Fail, Debug)]
pub enum ProofErrors {
    /// This error occurs when the verification of a `Proof` fails.
    #[fail(display = "proof verification failed")]
    ProofVerificationError,
    /// This error occurrs when the Prover structure already contains a
    /// preprocessed circuit inside, but you call preprocess again.
    #[fail(display = "circuit already preprocessed")]
    CircuitAlreadyPreprocessed,
}

#[derive(Debug, Fail)]
#[fail(display = "proof_system module error")]
/// Represents an error triggered on any of the proof_system
/// module operations such as verification errors
pub struct ProofError(#[fail(cause)] pub(crate) Error);