use thiserror::Error as DeriveError;
#[derive(Debug, DeriveError, PartialEq, Eq)]
pub enum TxError {
#[error("Transaction failed")]
Failed,
#[error("TVar is locked")]
LockPresent,
#[error("Transactional version has overflown")]
VersionOverflow,
#[error("The Transaction is locked")]
TransactionLocked,
#[error("Object is stale")]
StaleObject,
#[error("Transactable Variable has wrong version")]
VersionMismatch,
#[error("Shared value has been casted as the wrong type")]
SharedValueWrongTypeConversion,
}