MCPcopy Create free account
hub / github.com/juju/errors / ExampleTrace

Function ExampleTrace

example_test.go:12–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10)
11
12func ExampleTrace() {
13 var err1 error = fmt.Errorf("something wicked this way comes")
14 var err2 error = nil
15
16 // Tracing a non nil error will return an error
17 fmt.Println(errors.Trace(err1))
18 // Tracing nil will return nil
19 fmt.Println(errors.Trace(err2))
20
21 // Output: something wicked this way comes
22 // <nil>
23}

Callers

nothing calls this directly

Calls 1

TraceFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…