Skip to main content

ferro_migration/
error.rs

1//! Error type for ferro-migration helpers.
2
3use sea_orm::DbErr;
4use thiserror::Error;
5
6/// Error variants for ferro-migration backfill helpers.
7#[derive(Debug, Error)]
8pub enum Error {
9    /// The database backend is not supported by this helper.
10    #[error("unsupported backend: {0}")]
11    UnsupportedBackend(String),
12}
13
14impl From<Error> for DbErr {
15    fn from(e: Error) -> Self {
16        DbErr::Custom(e.to_string())
17    }
18}