#[non_exhaustive]pub enum FdbBindingError {
NonRetryableFdbError(FdbError),
HcaError(HcaError),
DirectoryError(DirectoryError),
PackError(PackError),
ReferenceToTransactionKept,
CustomError(Box<dyn Error + Send + Sync>),
ClientBudgetExceeded(BudgetExceeded),
LeaderElectionError(LeaderElectionError),
}Expand description
This error represent all errors that can be throwed by db.run.
Layer developers may use the CustomError.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonRetryableFdbError(FdbError)
HcaError(HcaError)
DirectoryError(DirectoryError)
PackError(PackError)
ReferenceToTransactionKept
A reference to the RetryableTransaction has been kept
CustomError(Box<dyn Error + Send + Sync>)
A custom error that layer developers can use
The retry loop of crate::Database::run recovers the underlying
FdbError by walking the boxed error’s source() chain, so box the
error itself (or a type that keeps the FdbError as its source()).
Never box a stringified error (e.to_string().into()): the conversion
destroys the source chain, and a retryable error becomes fatal.
ClientBudgetExceeded(BudgetExceeded)
The client-side budget of the transaction attempt was exceeded, as
reported by crate::Transaction::check_client_budget
LeaderElectionError(LeaderElectionError)
Leader election specific error
Implementations§
Source§impl FdbBindingError
impl FdbBindingError
Sourcepub fn get_fdb_error(&self) -> Option<FdbError>
pub fn get_fdb_error(&self) -> Option<FdbError>
Returns the underlying FdbError, if any.
A CustomError boxing an FdbError or an FdbBindingError is checked
first, then the whole source() chain is walked, so any error that
carries an FdbError as its source() (however deeply nested) is found.