massa_wallet/
error.rs

1// Copyright (c) 2022 MASSA LABS <info@massa.net>
2
3use displaydoc::Display;
4use massa_models::address::Address;
5use thiserror::Error;
6
7/// wallet error
8#[non_exhaustive]
9#[derive(Display, Error, Debug)]
10pub enum WalletError {
11    /// IO error: {0}
12    IOError(#[from] std::io::Error),
13    /// YAML error: {0}
14    YAMLError(#[from] serde_yaml::Error),
15    /// Serde Sq error: {0}
16    SerdeqsError(#[from] serde_qs::Error),
17    /// Models error: {0}
18    ModelsError(#[from] massa_models::error::ModelsError),
19    /// `MassaHash` error: {0}
20    MassaHashError(#[from] massa_hash::MassaHashError),
21    /// `MassaSignature` error: {0}
22    MassaSignatureError(#[from] massa_signature::MassaSignatureError),
23    /// Missing key error: {0}
24    MissingKeyError(Address),
25    /// `MassaCipher` error: {0}
26    MassaCipherError(#[from] massa_cipher::CipherError),
27    /// Version error: {0}
28    VersionError(String),
29    /// Inconsistent wallet file: {0}
30    InconsistentWalletFile(String),
31}