connectorx/sources/mssql/
errors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use std::string::FromUtf8Error;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum MsSQLSourceError {
    #[error("Cannot get # of rows in the partition")]
    GetNRowsFailed,

    #[error(transparent)]
    ConnectorXError(#[from] crate::errors::ConnectorXError),

    #[error(transparent)]
    MsSQLError(#[from] tiberius::error::Error),

    #[error(transparent)]
    MsSQLRuntimeError(#[from] bb8::RunError<bb8_tiberius::Error>),

    #[error(transparent)]
    MsSQLPoolError(#[from] bb8_tiberius::Error),

    #[error(transparent)]
    MsSQLUrlError(#[from] url::ParseError),

    #[error(transparent)]
    MsSQLUrlDecodeError(#[from] FromUtf8Error),

    /// Any other errors that are too trivial to be put here explicitly.
    #[error(transparent)]
    Other(#[from] anyhow::Error),
}