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

Function RegisterMultiCauseDecoder

errbase/decode.go:200–206  ·  view source on GitHub ↗

RegisterMultiCauseDecoder can be used to register new multi-cause wrapper types to the library. Registered wrappers will be decoded using their own Go type when an error is decoded. Multi-cause wrappers that have not been registered will be decoded using the opaqueWrapper type.

(theType TypeKey, decoder MultiCauseDecoder)

Source from the content-addressed store, hash-verified

198// wrappers that have not been registered will be decoded using the
199// opaqueWrapper type.
200func RegisterMultiCauseDecoder(theType TypeKey, decoder MultiCauseDecoder) {
201 if decoder == nil {
202 delete(multiCauseDecoders, theType)
203 } else {
204 multiCauseDecoders[theType] = decoder
205 }
206}

Callers 3

initFunction · 0.92
initFunction · 0.92

Calls

no outgoing calls

Tested by 1

initFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…