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

Function RegisterWrapperEncoder

errbase_api.go:144–146  ·  view source on GitHub ↗

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

(typeName TypeKey, encoder WrapperEncoder)

Source from the content-addressed store, hash-verified

142// or a different type, ensure that RegisterTypeMigration() was called
143// prior to RegisterWrapperEncoder().
144func RegisterWrapperEncoder(typeName TypeKey, encoder WrapperEncoder) {
145 errbase.RegisterWrapperEncoder(typeName, encoder)
146}
147
148// WrapperEncoder is to be provided (via RegisterWrapperEncoder above)
149// by additional wrapper types not yet known to this library.

Callers

nothing calls this directly

Calls 1

RegisterWrapperEncoderFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…