1#[derive(thiserror::Error, Debug)]
6pub enum ViewError {
7 #[error(transparent)]
9 BcsError(#[from] bcs::Error),
10
11 #[error("trying to access a collection view while some entries are still being accessed")]
13 CannotAcquireCollectionEntry,
14
15 #[error("I/O error")]
17 IoError(#[from] std::io::Error),
18
19 #[error(transparent)]
21 ArithmeticError(#[from] linera_base::data_types::ArithmeticError),
22
23 #[error(
25 "failed to lock a reentrant collection entry since it is currently being accessed: {0:?}"
26 )]
27 TryLockError(Vec<u8>),
28
29 #[error("panic in sub-task: {0}")]
31 TokioJoinError(#[from] tokio::task::JoinError),
32
33 #[error("storage operation error in {backend}: {error}")]
35 StoreError {
36 backend: &'static str,
38 #[source]
40 error: Box<dyn std::error::Error + Send + Sync>,
41 },
42
43 #[error("the key must not be too long")]
45 KeyTooLong,
46
47 #[error("entry does not exist in storage: {0}")]
50 NotFound(String),
51
52 #[error("inconsistent database entries")]
54 InconsistentEntries,
55
56 #[error("missing database entries")]
58 MissingEntries,
59
60 #[error("post load values error")]
62 PostLoadValuesError,
63}