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

Function Mark

markers/markers.go:227–233  ·  view source on GitHub ↗

Mark creates an explicit mark for the given error, using the same mark as some reference error. Note: if any of the error types has been migrated from a previous package location or a different type, ensure that RegisterTypeMigration() was called prior to Mark().

(err error, reference error)

Source from the content-addressed store, hash-verified

225// package location or a different type, ensure that
226// RegisterTypeMigration() was called prior to Mark().
227func Mark(err error, reference error) error {
228 if err == nil {
229 return nil
230 }
231 refMark := getMark(reference)
232 return &withMark{cause: err, mark: refMark}
233}
234
235// withMark carries an explicit mark.
236type withMark struct {

Callers 11

MarkFunction · 0.92
TestWrappedEquivalenceFunction · 0.92
TestFormatFunction · 0.92

Calls 1

getMarkFunction · 0.85

Tested by 10

TestWrappedEquivalenceFunction · 0.74
TestFormatFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…