panproto_protocols/
error.rs1#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum ProtocolError {
7 #[error("theory colimit failed: {0}")]
9 ColimitFailed(#[from] panproto_gat::GatError),
10
11 #[error("schema build failed: {0}")]
13 SchemaBuild(#[from] panproto_schema::SchemaError),
14
15 #[error("JSON error: {0}")]
17 Json(#[from] serde_json::Error),
18
19 #[error("parse error: {0}")]
21 Parse(String),
22
23 #[error("missing field: {0}")]
25 MissingField(String),
26
27 #[error("unknown reference: {0}")]
29 UnknownRef(String),
30
31 #[error("emit error: {0}")]
33 Emit(String),
34
35 #[error("protocol mismatch: expected {expected}, got vertex kinds {actual}")]
37 ProtocolMismatch {
38 expected: String,
40 actual: String,
42 },
43}