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

Function Wrap6

wrap.go:92–98  ·  view source on GitHub ↗

Wrap6 is used to [Wrap] the last error return when returning 6 values. This is useful when returning multiple returns from a function call directly: return Wrap6(fn()) Wrap6 is used by the CLI to avoid line number changes. go:noinline due to GetCaller (see [Wrap] for details).

(t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, err error)

Source from the content-addressed store, hash-verified

90//
91//go:noinline due to GetCaller (see [Wrap] for details).
92func Wrap6[T1, T2, T3, T4, T5 any](t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, err error) (T1, T2, T3, T4, T5, error) {
93 if err == nil {
94 return t1, t2, t3, t4, t5, nil
95 }
96
97 return t1, t2, t3, t4, t5, wrap(err, pc.GetCaller())
98}

Callers 1

TestWrap_LineFunction · 0.92

Calls 2

GetCallerFunction · 0.92
wrapFunction · 0.70

Tested by 1

TestWrap_LineFunction · 0.74