use thiserror::Error;
use uuid::Uuid;
#[derive(Debug, Error)]
pub enum SessionError {
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("invalid JSON in session file: {0}")]
InvalidJson(String),
#[error("session not found: {0}")]
SessionNotFound(Uuid),
#[error("entry not found: {0}")]
EntryNotFound(String),
#[error("branch not found: {0}")]
BranchNotFound(String),
#[error("failed to parse session file: {0}")]
ParseError(String),
#[error("session lock poisoned")]
LockPoisoned,
}