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

Function WrapWithDepthf

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

WrapWithDepthf wraps an error. It also annotates the provided pg code as new candidate code, to be used if the underlying error does not have one already.

(depth int, err error, code, format string, args ...interface{})

Source from the content-addressed store, hash-verified

22// pg code as new candidate code, to be used if the underlying
23// error does not have one already.
24func WrapWithDepthf(depth int, err error, code, format string, args ...interface{}) error {
25 err = errors.WrapWithDepthf(1+depth, err, format, args...)
26 err = WithCandidateCode(err, code)
27 return err
28}
29
30// Wrap wraps an error and adds a pg error code. Only the code
31// is added if the message is empty.

Callers 2

WrapfFunction · 0.85
WrapFunction · 0.85

Calls 1

WithCandidateCodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…