pg_setup/error.rs
1#[derive(thiserror::Error, Debug)]
2pub enum Error {
3 #[error("Unable to parse postgres URL: {0}")]
4 PgUrlParseError(String),
5 #[error("Error running process {0}")]
6 ProcessError(#[from] std::io::Error),
7 #[cfg(feature = "sqlx")]
8 #[error("Sqlx error: {0}")]
9 SqlxError(#[from] sqlx::Error),
10 #[error("{0}")]
11 Other(String),
12}
13
14// type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
15pub type Result<T> = std::result::Result<T, Error>;