MCPcopy Create free account
hub / github.com/bufbuild/buf / Wrap

Function Wrap

private/pkg/syserror/syserror.go:71–78  ·  view source on GitHub ↗

Wrap returns a new system error for err. If err is already a system error, this returns err.

(err error)

Source from the content-addressed store, hash-verified

69//
70// If err is already a system error, this returns err.
71func Wrap(err error) error {
72 if Is(err) {
73 return err
74 }
75 return &Error{
76 Underlying: err,
77 }
78}
79
80// Is is a convenience function that returns true if err is a system error.
81func Is(err error) bool {

Callers 15

runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92
runFunction · 0.92

Calls 1

IsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…