forked from icon-project/xcall-multi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.rs
45 lines (44 loc) · 1.3 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
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("Admin Already Exist")]
AdminAlreadyExist,
#[error("OwnerAlreadyExist")]
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("InsufficientFunds")]
InsufficientFunds,
#[error("ProtocolsMismatch")]
ProtocolsMismatch,
#[error("DataMismatch")]
DataMismatch,
#[error("CallAlreadyInProgress")]
CallAlreadyInProgress,
}