hyperplonk/transcript/src/errors.rs
transcript/src/errors.rsRaw
1// Copyright (c) 2023 Espresso Systems (espressosys.com)
2// This file is part of the HyperPlonk library.
3
4// You should have received a copy of the MIT License
5// along with the HyperPlonk library. If not, see <https://mit-license.org/>.
6
7//! Error module.
8
9use ark_std::string::String;
10use displaydoc::Display;
11
12/// A `enum` specifying the possible failure modes of the Transcript.
13#[derive(Display, Debug)]
14pub enum TranscriptError {
15 /// Invalid Transcript: {0}
16 InvalidTranscript(String),
17 /// An error during (de)serialization: {0}
18 SerializationError(ark_serialize::SerializationError),
19}
20
21impl From<ark_serialize::SerializationError> for TranscriptError {
22 fn from(e: ark_serialize::SerializationError) -> Self {
23 Self::SerializationError(e)
24 }
25}