grepdown_lib/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum Error {
5 #[error("database error: {0}")]
6 Rusqlite(#[from] rusqlite::Error),
7 #[error("io error: {0}")]
8 Io(#[from] std::io::Error),
9 #[error("No project found in current directory. Run `init` first to initialize a project.")]
10 ProjectNotFound,
11}
12
13pub type Result<T> = std::result::Result<T, Error>;