Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

errors.gno

0.55 Kb · 17 lines
 1package protocol_fee
 2
 3import (
 4	ufmt "gno.land/p/nt/ufmt/v0"
 5)
 6
 7const (
 8	errInvalidPct        = "[GNOSWAP-PROTOCOL_FEE-001] invalid percentage"
 9	errInvalidAmount     = "[GNOSWAP-PROTOCOL_FEE-002] invalid amount"
10	errProtocolFeeHalted = "[GNOSWAP-PROTOCOL_FEE-003] protocol fee halted"
11	errSpoofedRealm      = "[GNOSWAP-PROTOCOL_FEE-004] rlm does not match the current crossing frame"
12)
13
14// makeErrorWithDetail creates an error with additional context.
15func makeErrorWithDetail(message string, detail string) error {
16	return ufmt.Errorf("%s || %s", message, detail)
17}