rorm_sql/
error.rs

1/// Error type to simplify propagating different error types.
2use std::{error, fmt};
3
4/// Error type to simplify propagating different error types.
5#[derive(Debug)]
6pub enum Error {
7    /// Error while building sql.
8    SQLBuildError(String),
9}
10
11impl error::Error for Error {}
12
13impl fmt::Display for Error {
14    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15        match self {
16            Error::SQLBuildError(error) => {
17                write!(f, "sql build error: {error}")
18            }
19        }
20    }
21}