gitui/git2-hooks/src/error.rs
extrawurst 521ab91309
git2-hooks: allows customizing what places to look for hooks (#1975)
* allows customizing what places to look for hooks
2023-12-08 14:33:22 +01:00

24 lines
429 B
Rust

use thiserror::Error;
///
#[derive(Error, Debug)]
pub enum HooksError {
///
#[error("git error:{0}")]
Git(#[from] git2::Error),
///
#[error("io error:{0}")]
Io(#[from] std::io::Error),
///
#[error("path string conversion error")]
PathToString,
///
#[error("shellexpand error:{0}")]
ShellExpand(#[from] shellexpand::LookupError<std::env::VarError>),
}
///
pub type Result<T> = std::result::Result<T, HooksError>;