komple_framework_fee_module/
error.rs1use cosmwasm_std::{DivideByZeroError, StdError};
2use komple_framework_utils::{funds::FundsError, shared::SharedError, UtilError};
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("Execute locked")]
14 ExecuteLocked {},
15
16 #[error("Invalid fee")]
17 InvalidFee {},
18
19 #[error("Fee already exists")]
20 ExistingFee {},
21
22 #[error("Share already exists")]
23 ExistingShare {},
24
25 #[error("Fee not found")]
26 FeeNotFound {},
27
28 #[error("Total fee cannot exceed 1")]
29 InvalidTotalFee {},
30
31 #[error("No payments found for distribution")]
32 NoPaymentsFound {},
33
34 #[error("{0}")]
35 DivideByZeroError(#[from] DivideByZeroError),
36
37 #[error("{0}")]
38 UtilError(#[from] UtilError),
39
40 #[error("{0}")]
41 FundsError(#[from] FundsError),
42
43 #[error("{0}")]
44 SharedError(#[from] SharedError),
45}