MCPcopy Index your code
hub / github.com/bracesdev/errtrace / wrapExisting

Function wrapExisting

wrap_caller_test.go:43–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41var errFoo = errors.New("foo")
42
43func wrapExisting() error {
44 return errtrace.GetCaller().Wrap(errFoo)
45}
46
47func TestGetCallerWrap_PassCaller(t *testing.T) {
48 err := callPassCaller()

Callers 1

callWrapExistingFunction · 0.85

Calls 2

GetCallerFunction · 0.92
WrapMethod · 0.80

Tested by

no test coverage detected