1#[non_exhaustive]
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[error("IO error: {0}")]
8 IOError(#[from] std::io::Error),
10 #[error("Command run error: {0}")]
11 CommandRunError(String),
13 #[cfg(feature = "sqlx")]
14 #[error("DB error: {0}")]
15 DBError(#[from] sqlx::Error),
17 #[cfg(feature = "diesel")]
18 #[error("DB error: {0}")]
19 DBError(#[from] diesel::result::Error),
21 #[cfg(feature = "diesel")]
22 #[error("DB error: {0}")]
23 DBConnectionError(#[from] diesel::ConnectionError),
25 #[cfg(feature = "diesel")]
26 #[error("DB error: {0}")]
27 MigrationError(#[from] diesel_migrations::MigrationError),
29 #[cfg(any(feature = "mysql", feature = "postgres"))]
30 #[error("Unable to extract database name from connection string")]
31 ExtractDatabaseNameError,
33 #[cfg(any(feature = "mysql", feature = "postgres"))]
34 #[error("Uri configuration error: {0}")]
35 UriConfiguration(String),
37 #[cfg(any(feature = "mysql", feature = "postgres"))]
38 #[error("Uri configuration encoding error: {0}")]
39 UriConfigurationDecoding(#[from] core::str::Utf8Error),
41}