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