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

Function RegisterLeafDecoder

errbase_api.go:72–74  ·  view source on GitHub ↗

RegisterLeafDecoder can be used to register new leaf error types to the library. Registered types will be decoded using their own Go type when an error is decoded. Wrappers that have not been registered will be decoded using the opaqueLeaf type. Note: if the error type has been migrated from a prev

(typeName TypeKey, decoder LeafDecoder)

Source from the content-addressed store, hash-verified

70// or a different type, ensure that RegisterTypeMigration() was called
71// prior to RegisterLeafDecoder().
72func RegisterLeafDecoder(typeName TypeKey, decoder LeafDecoder) {
73 errbase.RegisterLeafDecoder(typeName, decoder)
74}
75
76// TypeKey identifies an error for the purpose of looking up decoders.
77// It is equivalent to the "family name" in ErrorTypeMarker.

Callers

nothing calls this directly

Calls 1

RegisterLeafDecoderFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…