hms_db/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum HmsDbError {
5 #[error("IO error: {0}")]
6 IO(#[from] std::io::Error),
7
8 #[error("Query error: {0}")]
9 QueryError(#[from] diesel::result::Error),
10
11 #[error("Connection error: {0}")]
12 ConnectionError(#[from] diesel::ConnectionError),
13
14 #[error("Migration error: {0}")]
15 MigrationError(String),
16
17 #[error("{0}")]
18 AliasConstraintError(String),
19}