You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
824 B

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