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

Function New

errors.go:15–17  ·  view source on GitHub ↗

New returns an error with the supplied text. It's equivalent to [errors.New] followed by [Wrap] to add caller information. go:noinline due to GetCaller (see [Wrap] for details).

(text string)

Source from the content-addressed store, hash-verified

13//
14//go:noinline due to GetCaller (see [Wrap] for details).
15func New(text string) error {
16 return wrap(errors.New(text), pc.GetCaller())
17}
18
19// Errorf creates an error message
20// according to a format specifier

Callers 9

TestFormatFunction · 0.92
f3Function · 0.92
TestWrap_LineFunction · 0.92
rateLimitDialerFunction · 0.92
recurseErrtraceFunction · 0.92
f3Function · 0.92
ParseMethod · 0.92
SkipNewFunction · 0.92
errorCalleeFunction · 0.85

Calls 2

GetCallerFunction · 0.92
wrapFunction · 0.70

Tested by 7

TestFormatFunction · 0.74
f3Function · 0.74
TestWrap_LineFunction · 0.74
rateLimitDialerFunction · 0.74
recurseErrtraceFunction · 0.74
f3Function · 0.74
errorCalleeFunction · 0.68