use thiserror::Error;
use crate::config::Error;
#[derive(Debug, Error)]
pub enum CliError {
#[error("Configuration error: {0}")]
Config(#[from] Error),
#[error("I/O error: {0}")]
IoError(String),
#[error("No schema files found matching: {0}")]
NoSchemaFiles(String),
#[error("Dialect mismatch between previous and current snapshots")]
DialectMismatch,
#[error("Database connection failed: {0}")]
ConnectionError(String),
#[error("Migration failed: {0}")]
MigrationError(String),
#[error("No driver available for {dialect}. Build with '{feature}' feature enabled.")]
MissingDriver {
dialect: &'static str,
feature: &'static str,
},
#[error("{operation} is not supported for driver '{driver}'. {hint}")]
UnsupportedForDriver {
operation: &'static str,
driver: &'static str,
hint: &'static str,
},
#[error("{0}")]
Other(String),
}