MCPcopy
hub / github.com/gogf/gf / NewCodeSkip

Function NewCodeSkip

errors/gerror/gerror_api_code.go:36–42  ·  view source on GitHub ↗

NewCodeSkip creates and returns an error which has error code and is formatted from given text. The parameter `skip` specifies the stack callers skipped amount.

(code gcode.Code, skip int, text ...string)

Source from the content-addressed store, hash-verified

34// NewCodeSkip creates and returns an error which has error code and is formatted from given text.
35// The parameter `skip` specifies the stack callers skipped amount.
36func NewCodeSkip(code gcode.Code, skip int, text ...string) error {
37 return &Error{
38 stack: callers(skip),
39 text: strings.Join(text, commaSeparatorSpace),
40 code: code,
41 }
42}
43
44// NewCodeSkipf returns an error that has error code and formats as the given format and args.
45// The parameter `skip` specifies the stack callers skipped amount.

Callers 3

Test_CodeFunction · 0.92
Benchmark_NewCodeSkipFunction · 0.92

Calls 2

callersFunction · 0.85
JoinMethod · 0.45

Tested by 3

Test_CodeFunction · 0.74
Benchmark_NewCodeSkipFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…