Documentation ¶
Overview ¶
nolint
Index ¶
- func HasErrorCode(err error, code abci.CodeType) bool
- func IsDecodingErr(err error) bool
- func IsInternalErr(err error) bool
- func IsInvalidFormatErr(err error) bool
- func IsMissingSignatureErr(err error) bool
- func IsSameError(pattern error, err error) bool
- func IsTooLargeErr(err error) bool
- func IsUnauthorizedErr(err error) bool
- func IsUnknownKeyErr(err error) bool
- func IsUnknownModuleErr(err error) bool
- func IsUnknownTxTypeErr(err error) bool
- func NoErr(err error) bool
- func Result(err error) abci.Result
- type CheckErr
- type TMError
- func ErrDecoding() TMError
- func ErrInternal(msg string) TMError
- func ErrInvalidFormat(expected string, tx interface{}) TMError
- func ErrMissingSignature() TMError
- func ErrTooLarge() TMError
- func ErrUnauthorized() TMError
- func ErrUnknownKey(mod string) TMError
- func ErrUnknownModule(mod string) TMError
- func ErrUnknownTxType(tx interface{}) TMError
- func New(msg string, code abci.CodeType) TMError
- func WithCode(err error, code abci.CodeType) TMError
- func WithMessage(prefix string, err error, code abci.CodeType) TMError
- func Wrap(err error) TMError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasErrorCode ¶
HasErrorCode checks if this error would return the named error code
func IsDecodingErr ¶
func IsInternalErr ¶
IsInternalErr matches any error that is not classified
func IsInvalidFormatErr ¶
func IsMissingSignatureErr ¶
func IsSameError ¶
IsSameError returns true if these errors have the same root cause. pattern is the expected error type and should always be non-nil err may be anything and returns true if it is a wrapped version of pattern
func IsTooLargeErr ¶
func IsUnauthorizedErr ¶
IsUnauthorizedErr is generic helper for any unauthorized errors, also specific sub-types
func IsUnknownKeyErr ¶
func IsUnknownModuleErr ¶
func IsUnknownTxTypeErr ¶
Types ¶
type TMError ¶
type TMError interface { ErrorCode() abci.CodeType Message() string // contains filtered or unexported methods }
TMError is the tendermint abci return type with stack trace
func ErrDecoding ¶
func ErrDecoding() TMError
func ErrInternal ¶
func ErrInvalidFormat ¶
func ErrMissingSignature ¶
func ErrMissingSignature() TMError
func ErrTooLarge ¶
func ErrTooLarge() TMError
func ErrUnauthorized ¶
func ErrUnauthorized() TMError
func ErrUnknownKey ¶
func ErrUnknownModule ¶
func ErrUnknownTxType ¶
func ErrUnknownTxType(tx interface{}) TMError
func New ¶
New adds a stacktrace if necessary and sets the code and msg, overriding the state if err was already TMError
func WithCode ¶
WithCode adds a stacktrace if necessary and sets the code and msg, overriding the state if err was already TMError
func WithMessage ¶
WithMessage prepends some text to the error, then calls WithCode It wraps the original error, so IsSameError will still match on err