drive/error/
contract.rs

1///DataContract errors
2#[derive(Debug, thiserror::Error)]
3pub enum DataContractError {
4    /// Overflow error
5    #[error("overflow error: {0}")]
6    Overflow(&'static str),
7
8    /// KeyBoundsExpectedButNotPresent error
9    #[error("key bounds expected but not present error: {0}")]
10    KeyBoundsExpectedButNotPresent(&'static str),
11
12    /// Data contract missing or cannot be retrieved
13    #[error("data contract cannot be retrieved: {0}")]
14    MissingContract(String),
15
16    /// Data contract provided is not the one we want
17    #[error("data contract provided is incorrect: {0}")]
18    ProvidedContractMismatch(String),
19
20    /// Data contract is corrupted
21    #[error("data contract is corrupted: {0}")]
22    CorruptedDataContract(String),
23
24    /// Data contract storage error when data contract is too big
25    #[error("data contract is too big to be stored: {0}")]
26    ContractTooBig(String),
27}