cw4_voting/
error.rs

1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum ContractError {
6    #[error("{0}")]
7    Std(#[from] StdError),
8
9    #[error("Unauthorized")]
10    Unauthorized {},
11
12    #[error("Can not change the contract's token after it has been set")]
13    DuplicateGroupContract {},
14
15    #[error("Error occured whilst instantiating group contract")]
16    GroupContractInstantiateError {},
17
18    #[error("Cannot instantiate a group contract with no initial members")]
19    NoMembers {},
20
21    #[error("Cannot instantiate a group contract with duplicate initial members")]
22    DuplicateMembers {},
23
24    #[error("Total weight of the CW4 contract cannot be zero")]
25    ZeroTotalWeight {},
26
27    #[error("Got a submessage reply with unknown id: {id}")]
28    UnknownReplyId { id: u64 },
29}