1use thiserror::Error;
4
5use crate::config::ConfigError;
6
7#[derive(Debug, Error)]
9pub enum CliError {
10 #[error("Configuration error: {0}")]
12 Config(#[from] ConfigError),
13
14 #[error("I/O error: {0}")]
16 IoError(String),
17
18 #[error("No schema files found matching: {0}")]
20 NoSchemaFiles(String),
21
22 #[error("Dialect mismatch between previous and current snapshots")]
24 DialectMismatch,
25
26 #[error("Database connection failed: {0}")]
28 ConnectionError(String),
29
30 #[error("Migration failed: {0}")]
32 MigrationError(String),
33
34 #[error("No driver available for {dialect}. Build with '{feature}' feature enabled.")]
36 MissingDriver {
37 dialect: &'static str,
38 feature: &'static str,
39 },
40
41 #[error("{0}")]
43 Other(String),
44}