MCPcopy Index your code
hub / github.com/cockroachdb/errors / GetTypeMark

Function GetTypeMark

errbase/encode.go:303–306  ·  view source on GitHub ↗

GetTypeMark retrieves the ErrorTypeMark for a given error object. This is meant for use in the markers sub-package.

(err error)

Source from the content-addressed store, hash-verified

301// GetTypeMark retrieves the ErrorTypeMark for a given error object.
302// This is meant for use in the markers sub-package.
303func GetTypeMark(err error) errorspb.ErrorTypeMark {
304 _, familyName, extension := getTypeDetails(err, false /*onlyFamily*/)
305 return errorspb.ErrorTypeMark{FamilyName: familyName, Extension: extension}
306}
307
308// EqualTypeMark checks whether `GetTypeMark(e1).Equals(GetTypeMark(e2))`. It
309// is written to be be optimized for the case where neither error has

Callers 3

getMarkFunction · 0.92
TestTypeNameFunction · 0.92
EqualTypeMarkFunction · 0.85

Calls 1

getTypeDetailsFunction · 0.85

Tested by 1

TestTypeNameFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…