diff --git a/types/errors/errors.go b/types/errors/errors.go index 1dcc63e656..c635beb976 100644 --- a/types/errors/errors.go +++ b/types/errors/errors.go @@ -257,6 +257,14 @@ func (e *Error) Is(err error) bool { } } +// Wrap extends this error with an additional information. +// It's a handy function to call Wrap with sdk errors. +func (e Error) Wrap(desc string) error { return Wrap(e, desc) } + +// Wrapf extends this error with an additional information. +// It's a handy function to call Wrapf with sdk errors. +func (e Error) Wrapf(desc string, args ...interface{}) error { return Wrapf(e, desc, args...) } + func isNilErr(err error) bool { // Reflect usage is necessary to correctly compare with // a nil implementation of an error.