MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Wrap

Function Wrap

pkg/sql/pgwire/pgerror/wrap.go:32–37  ·  view source on GitHub ↗

Wrap wraps an error and adds a pg error code. Only the code is added if the message is empty.

(err error, code, msg string)

Source from the content-addressed store, hash-verified

30// Wrap wraps an error and adds a pg error code. Only the code
31// is added if the message is empty.
32func Wrap(err error, code, msg string) error {
33 if msg == "" {
34 return WithCandidateCode(err, code)
35 }
36 return WrapWithDepthf(1, err, code, "%s", msg)
37}

Callers 1

EvalShardBucketCountFunction · 0.92

Calls 2

WithCandidateCodeFunction · 0.85
WrapWithDepthfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…