1use std::path::PathBuf;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("not a git repository: {0}")]
6 NotARepo(PathBuf),
7
8 #[error("git command failed: {0}")]
9 Git(String),
10
11 #[error("branch not found: {0}")]
12 BranchNotFound(String),
13
14 #[error("commit not found: {0}")]
15 CommitNotFound(String),
16
17 #[error("theme not found: {0} (use --list-themes to see available themes)")]
18 ThemeNotFound(String),
19
20 #[error("filter pattern error: {0}")]
21 Filter(String),
22
23 #[error("pdf generation failed: {0}")]
24 Pdf(String),
25
26 #[error("font loading failed: {0}")]
27 Font(String),
28
29 #[error(transparent)]
30 Io(#[from] std::io::Error),
31}