1use std::path::PathBuf;
7
8#[derive(Debug, thiserror::Error)]
10pub enum RinneError {
11 #[error("configuration error: {0}")]
12 Config(String),
13
14 #[error("worker error: {0}")]
15 Worker(String),
16
17 #[error("conductor error: {0}")]
18 Conductor(String),
19
20 #[error("blackboard error: {0}")]
21 Blackboard(String),
22
23 #[error("plan/DAG error: {0}")]
24 Plan(String),
25
26 #[error("cancelled: {0}")]
29 Cancelled(String),
30
31 #[error("path not found: {0}")]
32 NotFound(PathBuf),
33
34 #[error("feature not implemented: {0}")]
35 NotImplemented(&'static str),
36
37 #[error(transparent)]
38 Io(#[from] std::io::Error),
39
40 #[error(transparent)]
41 Json(#[from] serde_json::Error),
42}
43
44pub type Result<T> = std::result::Result<T, RinneError>;