MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / ChainError

Enum ChainError

chain/src/error.rs:20–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19#[derive(Error, Debug, Serialize, Deserialize, PartialEq)]
20pub enum ChainError {
21 #[error("Error parsing address {0}")]
22 AddrParseError(String),
23
24 #[error("Account {0} not found")]
25 AccountNotFound(String),
26
27 #[error("Block {0} not found")]
28 BlockNotFound(String),
29
30 #[error("Could not create root hash for : {0}")]
31 CannotCreateRootHash(String),
32
33 #[error("Error encoding/decoding: {0}")]
34 EncodingDecodingError(String),
35
36 #[error("Could not deserialize: {0}")]
37 DeserializeError(String),
38
39 #[error("Interal Error: {0}")]
40 InternalError(String),
41
42 #[error("Invalid block number {0}")]
43 InvalidBlockNumber(String),
44
45 #[error("JsonRpsee Error: {0}")]
46 JsonRpseeError(String),
47
48 #[error("Parent hash is missing: {0}")]
49 MissingHash(String),
50
51 #[error("Missing nonce for transaction: {0}")]
52 MissingTransactionNonce(String),
53
54 #[error("Nonce {0} too high for account {1}")]
55 NonceTooHigh(String, String),
56
57 #[error("Nonce {0} too low for account {1}")]
58 NonceTooLow(String, String),
59
60 #[error("Account {0} is not a contract account")]
61 NotAContractAccount(String),
62
63 #[error("Error executing contract at address {0}: {1}")]
64 RuntimeError(String, String),
65
66 #[error("Could not serialize: {0}")]
67 SerializeError(String),
68
69 #[error("Could not open the database: {0}")]
70 StorageCannotOpenDb(String),
71
72 #[error("Could not destroy the database: {0}")]
73 StorageDestroyError(String),
74
75 #[error("Could not find {0} in storage")]
76 StorageNotFound(String),
77

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected