Skip to main content

reflect_db/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum ReflectError {
3    #[error("Connection error: {0}")]
4    ConnectionError(String),
5    #[error("Query error: {0}")]
6    QueryError(String),
7    #[error("Unsupported feature: {0}")]
8    UnsupportedFeature(String),
9    #[error("Driver error: {0}")]
10    DriverError(String),
11}
12
13impl From<sqlx::Error> for ReflectError {
14    fn from(err: sqlx::Error) -> Self {
15        ReflectError::QueryError(err.to_string())
16    }
17}