connectorx/sources/mssql/
errors.rs

1use std::string::FromUtf8Error;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum MsSQLSourceError {
6    #[error("Cannot get # of rows in the partition")]
7    GetNRowsFailed,
8
9    #[error(transparent)]
10    ConnectorXError(#[from] crate::errors::ConnectorXError),
11
12    #[error(transparent)]
13    MsSQLError(#[from] tiberius::error::Error),
14
15    #[error(transparent)]
16    MsSQLRuntimeError(#[from] bb8::RunError<bb8_tiberius::Error>),
17
18    #[error(transparent)]
19    MsSQLPoolError(#[from] bb8_tiberius::Error),
20
21    #[error(transparent)]
22    MsSQLUrlError(#[from] url::ParseError),
23
24    #[error(transparent)]
25    MsSQLUrlDecodeError(#[from] FromUtf8Error),
26
27    /// Any other errors that are too trivial to be put here explicitly.
28    #[error(transparent)]
29    Other(#[from] anyhow::Error),
30}