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

Function DecodeError

errbase/decode.go:28–33  ·  view source on GitHub ↗

DecodeError decodes an error. Can only be called if the EncodedError is set (see IsSet()).

(ctx context.Context, enc EncodedError)

Source from the content-addressed store, hash-verified

26//
27// Can only be called if the EncodedError is set (see IsSet()).
28func DecodeError(ctx context.Context, enc EncodedError) error {
29 if w := enc.GetWrapper(); w != nil {
30 return decodeWrapper(ctx, w)
31 }
32 return decodeLeaf(ctx, enc.GetLeaf())
33}
34
35func decodeLeaf(ctx context.Context, enc *errorspb.EncodedErrorLeaf) error {
36 // In case there is a detailed payload, decode it.

Callers 15

DecodeErrorFunction · 0.92
TestWithContextFunction · 0.92
TestBarrierMaskedDetailsFunction · 0.92
decodeBarrierFunction · 0.92
decodeBarrierPrevFunction · 0.92
networkFunction · 0.92
TestDetailCaptureFunction · 0.92
TestIssueLinkFunction · 0.92
TestUnimplementedErrorFunction · 0.92
TestEncodeDecodeStatusFunction · 0.92
decodeWithSecondaryErrorFunction · 0.92

Calls 4

decodeWrapperFunction · 0.85
GetWrapperMethod · 0.80
GetLeafMethod · 0.80
decodeLeafFunction · 0.70

Tested by 15

TestWithContextFunction · 0.74
TestBarrierMaskedDetailsFunction · 0.74
networkFunction · 0.74
TestDetailCaptureFunction · 0.74
TestIssueLinkFunction · 0.74
TestUnimplementedErrorFunction · 0.74
TestEncodeDecodeStatusFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…