MCPcopy Create free account
hub / github.com/juju/errors / wrapErrorWithMsg

Function wrapErrorWithMsg

errortypes.go:79–87  ·  view source on GitHub ↗
(err error, msg string)

Source from the content-addressed store, hash-verified

77}
78
79func wrapErrorWithMsg(err error, msg string) error {
80 if err == nil {
81 return stderror.New(msg)
82 }
83 if msg == "" {
84 return err
85 }
86 return fmt.Errorf("%s: %w", msg, err)
87}
88
89func makeWrappedConstError(err error, format string, args ...interface{}) error {
90 separator := " "

Callers 15

NewTimeoutFunction · 0.85
NewNotFoundFunction · 0.85
NewUserNotFoundFunction · 0.85
NewUnauthorizedFunction · 0.85
NewNotImplementedFunction · 0.85
NewAlreadyExistsFunction · 0.85
NewNotSupportedFunction · 0.85
NewNotValidFunction · 0.85
NewNotProvisionedFunction · 0.85
NewNotAssignedFunction · 0.85
NewBadRequestFunction · 0.85
NewMethodNotAllowedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…