errors.gno
0.45 Kb · 15 lines
1package common
2
3import (
4 ufmt "gno.land/p/nt/ufmt/v0"
5)
6
7const (
8 errNotRegistered = "[GNOSWAP-COMMON-001] token is not registered"
9 errNotHandleNativeCoin = "[GNOSWAP-COMMON-002] handle native coin is not allowed"
10)
11
12// newErrorWithDetail creates an error message with additional context in format "<original_error> || <detail>".
13func newErrorWithDetail(message string, detail string) string {
14 return ufmt.Errorf("%s || %s", message, detail).Error()
15}