1use cosmwasm_std::StdError;
2use cw_utils::ParseReplyError;
3use thiserror::Error;
4
5#[derive(Error, Debug, PartialEq)]
6pub enum ContractError {
7 #[error("{0}")]
8 Std(#[from] StdError),
9
10 #[error("Unauthorized.")]
11 Unauthorized {},
12
13 #[error("The contract is paused.")]
14 Paused {},
15
16 #[error("No voting module provided.")]
17 NoVotingModule {},
18
19 #[error("Execution would result in no governance modules being present.")]
20 NoProposalModule {},
21
22 #[error("An unknown reply ID was received.")]
23 UnknownReplyID {},
24
25 #[error("{0}")]
26 ParseReplyError(#[from] ParseReplyError),
27
28 #[error("Multiple voting modules during instantiation.")]
29 MultipleVotingModules {},
30
31 #[error("Unsigned integer overflow.")]
32 Overflow {},
33
34 #[error("Key is missing from storage")]
35 KeyMissing {},
36
37 #[error("No pending admin nomination.")]
38 NoAdminNomination {},
39
40 #[error(
41 "The pending admin nomination must be withdrawn before a new nomination can be created."
42 )]
43 PendingNomination {},
44}