Wrap5 is used to [Wrap] the last error return when returning 5 values. This is useful when returning multiple returns from a function call directly: return Wrap5(fn()) Wrap5 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, err error)
| 74 | // |
| 75 | //go:noinline due to GetCaller (see [Wrap] for details). |
| 76 | func Wrap5[T1, T2, T3, T4 any](t1 T1, t2 T2, t3 T3, t4 T4, err error) (T1, T2, T3, T4, error) { |
| 77 | if err == nil { |
| 78 | return t1, t2, t3, t4, nil |
| 79 | } |
| 80 | |
| 81 | return t1, t2, t3, t4, wrap(err, pc.GetCaller()) |
| 82 | } |
| 83 | |
| 84 | // Wrap6 is used to [Wrap] the last error return when returning 6 values. |
| 85 | // This is useful when returning multiple returns from a function call directly: |