1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use ;
use crateNovaXError;
/// An enumeration of errors that may occur during account-related operations within the contract framework.
/// These errors primarily arise during the fetching and parsing of account information.
///
/// # Variants
///
/// - `CannotFetchAccountInfos`: This variant is triggered when there's a failure in fetching account information.
/// This could be due to network issues, incorrect configurations, or other unforeseen circumstances that prevent
/// the retrieval of account data.
///
/// - `CannotParseAccountInfos`: This variant is triggered when there's a failure in parsing the fetched account information.
/// This could occur if the data structure of the account information has changed or if there's a bug in the parsing logic.
///
/// # Conversion to NovaXError
///
/// This enum implements a conversion to `NovaXError`, a more general error type, via the `From` trait.
/// This allows for easy error propagation with the `?` operator and better integration with the overarching error handling framework.