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

Function RegisterWrapperDecoder

errbase_api.go:111–113  ·  view source on GitHub ↗

RegisterWrapperDecoder can be used to register new wrapper types to the library. Registered wrappers will be decoded using their own Go type when an error is decoded. Wrappers that have not been registered will be decoded using the opaqueWrapper type. Note: if the error type has been migrated from

(typeName TypeKey, decoder WrapperDecoder)

Source from the content-addressed store, hash-verified

109// or a different type, ensure that RegisterTypeMigration() was called
110// prior to RegisterWrapperDecoder().
111func RegisterWrapperDecoder(typeName TypeKey, decoder WrapperDecoder) {
112 errbase.RegisterWrapperDecoder(typeName, decoder)
113}
114
115// WrapperDecoder is to be provided (via RegisterWrapperDecoder above)
116// by additional wrapper types not yet known to this library.

Callers

nothing calls this directly

Calls 1

RegisterWrapperDecoderFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…