pub enum MsSqlError {
Connection(ConnectionError),
Lsn(LsnError),
PrimaryKey(PrimaryKeyError),
InvalidIdentifier(String),
Query(String),
Config(String),
Other(String),
}Expand description
Errors specific to MS SQL CDC operations
Variants§
Connection(ConnectionError)
Connection-related errors (network issues, authentication failures, etc.)
Lsn(LsnError)
LSN-related errors (invalid LSN, out of range, etc.)
PrimaryKey(PrimaryKeyError)
Primary key errors (missing key, NULL values, etc.)
InvalidIdentifier(String)
SQL identifier validation errors
Query(String)
Query execution errors
Config(String)
Configuration errors
Other(String)
Other errors that don’t fit into specific categories
Implementations§
Source§impl MsSqlError
impl MsSqlError
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Check if this error is a connection-related error
Sourcepub fn is_recoverable_lsn_error(&self) -> bool
pub fn is_recoverable_lsn_error(&self) -> bool
Check if this error is an LSN-related error that can be recovered by resetting the checkpoint
Sourcepub fn from_connection_error(error: impl ToString) -> MsSqlError
pub fn from_connection_error(error: impl ToString) -> MsSqlError
Create a connection error from an underlying error message
Sourcepub fn classify(error: &Error) -> Option<MsSqlErrorKind>
pub fn classify(error: &Error) -> Option<MsSqlErrorKind>
Attempt to classify an anyhow::Error as an MsSqlError
This checks if the error is already an MsSqlError (via downcast), or attempts to classify it based on error message patterns.
Trait Implementations§
Source§impl Debug for MsSqlError
impl Debug for MsSqlError
Source§impl Display for MsSqlError
impl Display for MsSqlError
Source§impl Error for MsSqlError
impl Error for MsSqlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()