mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 14:06:29 +03:00
22 lines
631 B
Rust
22 lines
631 B
Rust
#[derive(Debug, thiserror::Error)]
|
|
pub enum Error {
|
|
#[error("Sqlite error: {0:?}")]
|
|
Sql(#[from] rusqlite::Error),
|
|
#[error("Sqlite Connection Pool Error: {0:?}")]
|
|
ConnectionPool(#[from] r2d2::Error),
|
|
#[error("Sqlite: Connection closed")]
|
|
SqlNoConnection,
|
|
#[error("Sqlite: Already open")]
|
|
SqlAlreadyOpen,
|
|
#[error("Sqlite: Failed to open")]
|
|
SqlFailedToOpen,
|
|
#[error("{0}")]
|
|
Io(#[from] std::io::Error),
|
|
// #[error("{0:?}")]
|
|
// BlobError(#[from] crate::blob::BlobError),
|
|
#[error("{0}")]
|
|
Other(#[from] anyhow::Error),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|