hyperplonk/poly-iop/src/errors.rs
poly-iop/src/errors.rsRaw
1//! Error module.
2
3use ark_std::string::String;
4use displaydoc::Display;
5
6/// A `enum` specifying the possible failure modes of the PolyIOP.
7#[derive(Display, Debug)]
8pub enum PolyIOPErrors {
9 /// Invalid Prover: {0}
10 InvalidProver(String),
11 /// Invalid Verifier: {0}
12 InvalidVerifier(String),
13 /// Invalid Proof: {0}
14 InvalidProof(String),
15 /// Invalid parameters: {0}
16 InvalidParameters(String),
17 /// Invalid Transcript: {0}
18 InvalidTranscript(String),
19 /// Should not arrive to this point
20 ShouldNotArrive,
21 /// An error during (de)serialization: {0}
22 SerializationError(ark_serialize::SerializationError),
23}
24
25impl From<ark_serialize::SerializationError> for PolyIOPErrors {
26 fn from(e: ark_serialize::SerializationError) -> Self {
27 Self::SerializationError(e)
28 }
29}