node/external_snark_worker/
external_snark_worker_errors.rs1use serde::{Deserialize, Serialize};
2
3use super::SnarkWorkSpecError;
4
5#[derive(Clone, Debug, Serialize, Deserialize, thiserror::Error)]
6pub enum ExternalSnarkWorkerError {
7 #[error("error decoding binprot: {_0}")]
8 BinprotError(String),
9 #[error("I/O error: {_0}")]
10 IOError(String),
11 #[error("timeout starting external worker")]
12 StartTimeout,
13 #[error("other error: {_0}")]
14 Error(String),
15 #[error("snark worker is not running")]
16 NotRunning,
17 #[error("snark worker is busy")]
18 Busy,
19 #[error("redux logic is broken: {_0}")]
21 Broken(String),
22}
23
24#[derive(Clone, Debug, derive_more::From, Serialize, Deserialize, thiserror::Error)]
25pub enum ExternalSnarkWorkerWorkError {
26 #[error("invalid snark work specification: {_0}")]
27 WorkSpecError(SnarkWorkSpecError),
28 #[error("snark worker error: {_0}")]
29 WorkerError(ExternalSnarkWorkerError),
30 #[error("work is cancelled")]
31 Cancelled,
32 #[error("error producing snark: {_0}")]
33 Error(String),
34}