journal_registry/repository/
error.rs1use std::path::PathBuf;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
6pub enum RepositoryError {
7 #[error("I/O error: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("Failed to parse journal file path: {path}")]
13 InvalidPath { path: String },
14
15 #[error("Path contains invalid UTF-8: {}", .path.display())]
17 InvalidUtf8 { path: PathBuf },
18
19 #[error("Directory walk error: {0}")]
21 WalkDir(#[from] walkdir::Error),
22}
23
24pub type Result<T> = std::result::Result<T, RepositoryError>;