pfc_tester/
errors.rs

1#![allow(missing_docs)]
2
3use glob::PatternError;
4use std::num::{ParseFloatError, ParseIntError};
5use terra_rust_api::errors::TerraRustAPIError;
6use terra_rust_cli::errors::TerraRustCLIError;
7use terra_rust_wallet::errors::TerraRustWalletError;
8use thiserror::Error;
9
10#[derive(Error, Debug)]
11pub enum TerraRustTestingError {
12    #[error("Bad Implementation. Missing CLI Argument {0}")]
13    MissingArgument(String),
14    #[error(transparent)]
15    IOErr(#[from] ::std::io::Error),
16    #[error(transparent)]
17    NumberFloatErr(#[from] ParseFloatError),
18    #[error(transparent)]
19    NumberIntErr(#[from] ParseIntError),
20    #[error(transparent)]
21    TerraRustAPIError(#[from] TerraRustAPIError),
22    #[error(transparent)]
23    TerraRustCLIError(#[from] TerraRustCLIError),
24    #[error(transparent)]
25    TerraRustWalletError(#[from] TerraRustWalletError),
26    #[error(transparent)]
27    SerdeJson(#[from] ::serde_json::Error),
28    #[error(transparent)]
29    GlobError(#[from] ::glob::GlobError),
30    #[error(transparent)]
31    PatternError(#[from] PatternError),
32
33    #[error("{0} is not a directory")]
34    NotADirectory(String),
35    #[error("{0} matches multiple wasms (or none). choose better")]
36    TooManyMatches(String),
37    #[error("query {0} {1} response mismatch {2} {3}")]
38    QueryResponseFail(String, String, String, String),
39    #[error("exec {0} {1} response mismatch {2} {3}/{4}  Hash:{5}")]
40    ExecResponseFail(String, String, String, String, String, String),
41    #[error("exec {0} {1} was supposed to fail {2}")]
42    ExecResponseShouldHaveFailed(String, String, String),
43    #[error("exec {0} {1} was supposed to fail  {2} {3}")]
44    ExecResponseShouldHaveFailedMessage(String, String, String, String),
45}