komple_framework_mint_module/
error.rs1use cosmwasm_std::StdError;
2use komple_framework_utils::{funds::FundsError, shared::SharedError, UtilError};
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum ContractError {
7 #[error("{0}")]
8 Std(#[from] StdError),
9
10 #[error("Unauthorized")]
11 Unauthorized {},
12
13 #[error("Execute locked")]
14 ExecuteLocked {},
15
16 #[error("Minting locked")]
17 LockedMint {},
18
19 #[error("Invalid reply ID")]
20 InvalidReplyID {},
21
22 #[error("Error while instantiating token contract")]
23 TokenInstantiateError {},
24
25 #[error("Collection ID not found")]
26 CollectionIdNotFound {},
27
28 #[error("Collection cannot be linked to itself")]
29 SelfLinkedCollection {},
30
31 #[error("Collection is already blacklisted")]
32 AlreadyBlacklisted {},
33
34 #[error("Collection is already whitelistlisted")]
35 AlreadyWhitelistlisted {},
36
37 #[error("Address is not whitelisted")]
38 AddressNotWhitelisted {},
39
40 #[error("Whitelist price is not set")]
41 WhitelistPriceNotSet {},
42
43 #[error("{0}")]
44 Util(#[from] UtilError),
45
46 #[error("{0}")]
47 Funds(#[from] FundsError),
48
49 #[error("{0}")]
50 SharedError(#[from] SharedError),
51
52 #[error("Semver parsing error: {0}")]
53 SemVer(String),
54}
55
56impl From<semver::Error> for ContractError {
57 fn from(err: semver::Error) -> Self {
58 Self::SemVer(err.to_string())
59 }
60}