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

Function FullError

pkg/sql/pgwire/pgerror/errors.go:54–63  ·  view source on GitHub ↗

FullError can be used when the hint and/or detail are to be tested.

(err error)

Source from the content-addressed store, hash-verified

52
53// FullError can be used when the hint and/or detail are to be tested.
54func FullError(err error) string {
55 var errString string
56 if pqErr, ok := err.(*pq.Error); ok {
57 errString = formatMsgHintDetail("pq: ", pqErr.Message, pqErr.Hint, pqErr.Detail)
58 } else {
59 pg := Flatten(err)
60 errString = formatMsgHintDetail("", err.Error(), pg.Hint, pg.Detail)
61 }
62 return errString
63}
64
65func formatMsgHintDetail(prefix, msg, hint, detail string) string {
66 var b strings.Builder

Callers 2

IsErrorFunction · 0.92
IsSQLRetryableErrorFunction · 0.85

Calls 3

formatMsgHintDetailFunction · 0.85
FlattenFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…