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

Function network

errbase/adapters_test.go:33–40  ·  view source on GitHub ↗
(t *testing.T, err error)

Source from the content-addressed store, hash-verified

31)
32
33func network(t *testing.T, err error) error {
34 t.Helper()
35 enc := errbase.EncodeError(context.Background(), err)
36 t.Logf("encoded: %# v", pretty.Formatter(enc))
37 newErr := errbase.DecodeError(context.Background(), enc)
38 t.Logf("decoded: %# v", pretty.Formatter(newErr))
39 return newErr
40}
41
42func TestAdaptBaseGoErr(t *testing.T) {
43 // Base Go errors are preserved completely.

Callers 14

TestAdaptBaseGoErrFunction · 0.70
TestAdaptGoSingleWrapErrFunction · 0.70
TestAdaptBaseGoJoinErrFunction · 0.70
TestAdaptGoMultiWrapErrFunction · 0.70
TestAdaptPkgWithMessageFunction · 0.70
TestAdaptPkgFundamentalFunction · 0.70
TestAdaptPkgWithStackFunction · 0.70
TestAdaptProtoErrorsFunction · 0.70
TestAdaptContextCanceledFunction · 0.70
TestAdaptOsErrorsFunction · 0.70
TestAdaptErrnoFunction · 0.70

Calls 2

EncodeErrorFunction · 0.92
DecodeErrorFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…