-
Notifications
You must be signed in to change notification settings - Fork 15
/
error.rs
56 lines (55 loc) · 1.72 KB
/
error.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use super::*;
#[derive(Error, Debug)]
pub enum ContractError {
#[error("{0}")]
Std(#[from] StdError),
#[error("Unauthorized")]
Unauthorized {},
#[error("ERR_REPLY_ERROR|{code:?}|{msg:?}")]
ReplyError { code: u64, msg: String },
#[error("Only Ordered Channels Are Supported")]
UnOrderedChannel {},
#[error("Invalid IBC Channel Version. Got ({actual}), expected ({expected})")]
InvalidVersion { actual: String, expected: String },
#[error("Admin Already Exist")]
AdminAlreadyExist,
#[error("OwnerAlreadyExist")]
OwnerAlreadyExist,
#[error("AdminNotExist")]
AdminNotExist,
#[error("RollbackNotPossible")]
RollbackNotPossible,
#[error("MaxDataSizeExceeded")]
MaxDataSizeExceeded,
#[error("MaxRollbackSizeExceeded")]
MaxRollbackSizeExceeded,
#[error("NotExistRequestId {id}")]
NotExistRequestId { id: u128 },
#[error("InvalidRequestId {id}")]
InvalidRequestId { id: u128 },
#[error("RollbackNotEnabled")]
RollbackNotEnabled,
#[error("InvalidSequenceId {id}")]
InvalidSequenceId { id: u128 },
#[error("DecodeFailed {error}")]
DecodeFailed { error: String },
#[error("OnlyAdmin")]
OnlyAdmin,
#[error("AdminAddressCannotBeNull")]
AdminAddressCannotBeNull {},
#[error("InvalidAddress {address}")]
InvalidAddress { address: String },
#[error("OnlyIbcHandler")]
OnlyIbcHandler {},
#[error("Connection Already Configured for {connection_id} and {port_id}")]
ConnectionAlreadyConfigured {
connection_id: String,
port_id: String,
},
#[error("NoFeesAccrued")]
NoFeesAccrued,
#[error("InvalidPortId")]
InvalidPortId,
#[error("InsufficientFunds")]
InsufficientFunds,
}