arbos/address_table/
error.rs

1use arb_storage::StorageError;
2
3/// Errors raised by the address-table storage container.
4#[derive(Clone, thiserror::Error, Debug)]
5pub enum AddressTableError {
6    /// Underlying storage failure.
7    #[error(transparent)]
8    Storage(#[from] StorageError),
9
10    /// `decompress` received bytes that are not a valid RLP-encoded address
11    /// or compact index.
12    #[error("failed to RLP-decode address-table input")]
13    InvalidEncoding,
14
15    /// `decompress` received an index that does not point at any registered
16    /// address.
17    #[error("address-table index {0} is out of range")]
18    IndexOutOfRange(u64),
19}