Kagome
Polkadot Runtime Engine in C++17
block_tree_error.cpp
Go to the documentation of this file.
1 
7 
10  switch (e) {
11  case E::NO_PARENT:
12  return "block, which should have been added, has no known parent";
13  case E::BLOCK_EXISTS:
14  return "block, which should have been inserted, already exists in the "
15  "tree";
16  case E::SOME_BLOCK_IN_CHAIN_NOT_FOUND:
17  return "one of the blocks for getting the chain was not found in the "
18  "local storage";
19  case E::TARGET_IS_PAST_MAX:
20  return "target block number is past the given maximum number";
21  case E::BLOCK_ON_DEAD_END:
22  return "block resides on a dead fork";
23  case E::EXISTING_BLOCK_NOT_FOUND:
24  return "block exists in chain but not found when following all leaves "
25  "backwards";
26  case E::NON_FINALIZED_BLOCK_NOT_FOUND:
27  return "a non-finalized block is not found";
28  case E::JUSTIFICATION_NOT_FOUND:
29  return "the requested justification is not found in block storage";
30  case E::HEADER_NOT_FOUND:
31  return "the requested block header is not found in block storage";
32  case E::BODY_NOT_FOUND:
33  return "the requested block body is not found in block storage";
34  case E::BLOCK_IS_NOT_LEAF:
35  return "the target block is not a leaf";
36  }
37  return "unknown error";
38 }
OUTCOME_CPP_DEFINE_CATEGORY(kagome::blockchain, BlockTreeError, e)