1use thiserror::Error;
2use uuid::Uuid;
3
4#[derive(Debug, Error)]
6pub enum SessionError {
7 #[error("I/O error: {0}")]
9 IoError(#[from] std::io::Error),
10
11 #[error("invalid JSON in session file: {0}")]
13 InvalidJson(String),
14
15 #[error("session not found: {0}")]
17 SessionNotFound(Uuid),
18
19 #[error("entry not found: {0}")]
21 EntryNotFound(String),
22
23 #[error("branch not found: {0}")]
25 BranchNotFound(String),
26
27 #[error("failed to parse session file: {0}")]
29 ParseError(String),
30
31 #[error("session lock poisoned")]
33 LockPoisoned,
34}