Documentation
¶
Index ¶
- Variables
- func CombineByString(err error) error
- func ErrorContains(err error, substr string) bool
- func ErrorContainsAny(err error, substrs ...string) bool
- func Flatten(err error) []error
- func HandleErrDefer(f func() error)
- func IsAny(err error, errs ...error) bool
- func IsErrorExcept(err error, errs ...error) bool
- func IsErrorExceptSubstr(err error, substr ...string) bool
- func Join(errs ...error) error
- func Root(err error) error
- func Roots(errs []error) error
- func TruncateErrorForLogging(err error, maxLength int) error
- func Unwraps(err error) []error
- func Wrap(err error, msg string) error
- func WrapAndTrace2[T any](t T, err error) (T, error)
- func WrapAndTraceInMsg(err error) error
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var As = stderrors.As
View Source
var Errorf = fmt.Errorf
View Source
var Is = stderrors.Is
View Source
var New = stderrors.New
View Source
var Unwrap = stderrors.Unwrap
View Source
var WrapAndTrace = WrapAndTraceInMsg
Functions ¶
func ErrorContains ¶
func ErrorContainsAny ¶
func HandleErrDefer ¶
func HandleErrDefer(f func() error)
func IsErrorExcept ¶
func IsErrorExceptSubstr ¶
func TruncateErrorForLogging ¶
TruncateErrorForLogging truncates a long error message to a more manageable size while preserving the most important parts of the error message
func WrapAndTrace2 ¶
func WrapAndTraceInMsg ¶
Types ¶
type ValidationError ¶
type ValidationError struct {
Message string
}
func NewValidationError ¶
func NewValidationError(message string) ValidationError
func (ValidationError) Error ¶
func (v ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.