#[non_exhaustive]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("IO error: {0}")]
IOError(#[from] std::io::Error),
#[error("Command run error: {0}")]
CommandRunError(String),
#[cfg(feature = "sqlx")]
#[error("DB error: {0}")]
DBError(#[from] sqlx::Error),
#[cfg(feature = "diesel")]
#[error("DB error: {0}")]
DBError(#[from] diesel::result::Error),
#[cfg(feature = "diesel")]
#[error("DB error: {0}")]
DBConnectionError(#[from] diesel::ConnectionError),
#[cfg(feature = "diesel")]
#[error("DB error: {0}")]
MigrationError(#[from] diesel_migrations::MigrationError),
#[cfg(any(feature = "mysql", feature = "postgres"))]
#[error("Unable to extract database name from connection string")]
ExtractDatabaseNameError,
#[cfg(any(feature = "mysql", feature = "postgres"))]
#[error("Uri configuration error: {0}")]
UriConfiguration(String),
#[cfg(any(feature = "mysql", feature = "postgres"))]
#[error("Uri configuration encoding error: {0}")]
UriConfigurationDecoding(#[from] core::str::Utf8Error),
}