1use thiserror::Error;
2
3pub type Result<T, E = Error> = std::result::Result<T, E>;
4
5#[derive(Debug, Error)]
6pub enum Error {
7 #[error("io: {0}")]
8 Io(#[from] std::io::Error),
9
10 #[error("config: {0}")]
11 Config(String),
12
13 #[error("template: {0}")]
14 Template(String),
15
16 #[error("git: {0}")]
17 Git(String),
18
19 #[error("source repo not found (set --source / $YUI_SOURCE)")]
20 SourceNotFound,
21
22 #[error("absorb conflict: {0}")]
23 AbsorbConflict(String),
24
25 #[error(transparent)]
26 Other(#[from] anyhow::Error),
27}