MCPcopy Create free account
hub / github.com/cockroachdb/errors / getDetails

Function getDetails

errbase/safe_details.go:56–66  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

54}
55
56func getDetails(err error) []string {
57 if sd, ok := err.(SafeDetailer); ok {
58 return sd.SafeDetails()
59 }
60 // For convenience, we also know how to extract stack traces
61 // in the style of github.com/pkg/errors.
62 if st, ok := err.(interface{ StackTrace() pkgErr.StackTrace }); ok {
63 return []string{fmt.Sprintf("%+v", st.StackTrace())}
64 }
65 return nil
66}
67
68// SafeDetailPayload captures the safe strings for one
69// level of wrapping.

Callers 1

GetSafeDetailsFunction · 0.85

Calls 2

SafeDetailsMethod · 0.65
StackTraceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…