1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum JourneyError {
5 #[error("Configuration error: {0}")]
6 Config(String),
7
8 #[error("IO error: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("YAML parsing error: {0}")]
12 Yaml(#[from] serde_yaml_ng::Error),
13
14 #[error("JSON parsing error: {0}")]
15 Json(#[from] serde_json::Error),
16
17 #[error("Date/time parsing error: {0}")]
18 DateTime(#[from] chrono::ParseError),
19
20 #[error("Vault not found: {0}")]
21 VaultNotFound(String),
22
23 #[error("Invalid date format: {0}")]
24 InvalidDateFormat(String),
25
26 #[error("Invalid time format: {0}")]
27 InvalidTimeFormat(String),
28
29 #[error("Editor not found: {0}")]
30 EditorNotFound(String),
31}
32