MCPcopy
hub / github.com/duke-git/lancet / ExampleWrap

Function ExampleWrap

xerror/xerror_example_test.go:20–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20func ExampleWrap() {
21 err := New("wrong password")
22 wrapErr := Wrap(err, "error")
23
24 fmt.Println(wrapErr.Error())
25
26 // Output:
27 // error: wrong password
28}
29
30func ExampleXError_Wrap() {
31 err1 := New("error").With("level", "high")

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
WrapFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…