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

Function GetSafeDetails

errbase/safe_details.go:45–54  ·  view source on GitHub ↗

GetSafeDetails collects the safe details from the given error object. If it is a wrapper, only the details from the wrapper are returned.

(err error)

Source from the content-addressed store, hash-verified

43// object. If it is a wrapper, only the details from the wrapper are
44// returned.
45func GetSafeDetails(err error) (payload SafeDetailPayload) {
46 origTypeName, famName, ext := getTypeDetails(err, false /*onlyFamily*/)
47 payload.OriginalTypeName = origTypeName
48 payload.ErrorTypeMark = errorspb.ErrorTypeMark{
49 FamilyName: famName,
50 Extension: ext,
51 }
52 payload.SafeDetails = getDetails(err)
53 return
54}
55
56func getDetails(err error) []string {
57 if sd, ok := err.(SafeDetailer); ok {

Callers 7

GetSafeDetailsFunction · 0.92
SafeDetailsMethod · 0.92
SafeDetailsMethod · 0.92
TestAdaptPkgFundamentalFunction · 0.92
TestAdaptPkgWithStackFunction · 0.92
BuildSentryReportFunction · 0.92
GetAllSafeDetailsFunction · 0.70

Calls 2

getTypeDetailsFunction · 0.85
getDetailsFunction · 0.85

Tested by 2

TestAdaptPkgFundamentalFunction · 0.74
TestAdaptPkgWithStackFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…