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

Function ErrorStack

functions.go:287–289  ·  view source on GitHub ↗

ErrorStack returns a string representation of the annotated error. If the error passed as the parameter is not an annotated error, the result is simply the result of the Error() method on that error. If the error is an annotated error, a multi-line string is returned where each line represents one

(err error)

Source from the content-addressed store, hash-verified

285// github.com/juju/errors/annotation_test.go:196: more context
286// github.com/juju/errors/annotation_test.go:197:
287func ErrorStack(err error) string {
288 return strings.Join(errorStack(err), "\n")
289}
290
291func errorStack(err error) []string {
292 if err == nil {

Callers 3

TestErrorStackMethod · 0.92
TestSetLocationMethod · 0.92
FormatMethod · 0.85

Calls 1

errorStackFunction · 0.85

Tested by 2

TestErrorStackMethod · 0.74
TestSetLocationMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…