errors.gno
1.20 Kb · 25 lines
1package v1
2
3import (
4 "errors"
5
6 ufmt "gno.land/p/nt/ufmt/v0"
7)
8
9var (
10 errDataNotFound = errors.New("[GNOSWAP-GOV_STAKER-001] requested data not found")
11 errInvalidAmount = errors.New("[GNOSWAP-GOV_STAKER-002] invalid amount")
12 errNoDelegatedAmount = errors.New("[GNOSWAP-GOV_STAKER-003] zero delegated amount")
13 errNotEnoughDelegated = errors.New("[GNOSWAP-GOV_STAKER-004] not enough delegated")
14 errInvalidAddress = errors.New("[GNOSWAP-GOV_STAKER-005] invalid address")
15 errNotEnoughBalance = errors.New("[GNOSWAP-GOV_STAKER-006] not enough balance")
16 errLessThanMinimum = errors.New("[GNOSWAP-GOV_STAKER-007] cannot delegate less than minimum amount")
17 errInvalidSnapshotTime = errors.New("[GNOSWAP-GOV_STAKER-008] invalid snapshot time")
18 errSameDelegatee = errors.New("[GNOSWAP-GOV_STAKER-009] cannot redelegate to same address")
19 errWithdrawNotCollectable = errors.New("[GNOSWAP-GOV_STAKER-010] withdraw is not collectable")
20 errSpoofedRealm = errors.New("[GNOSWAP-GOV_STAKER-011] rlm does not match the current crossing frame")
21)
22
23func makeErrorWithDetails(err error, detail string) error {
24 return ufmt.Errorf("%s || %s", err.Error(), detail)
25}