MCPcopy Create free account
hub / github.com/cockroachdb/errors / SafeFormatError

Method SafeFormatError

markers/markers.go:251–261  ·  view source on GitHub ↗
(p errbase.Printer)

Source from the content-addressed store, hash-verified

249func (m *withMark) Format(s fmt.State, verb rune) { errbase.FormatError(m, s, verb) }
250
251func (m *withMark) SafeFormatError(p errbase.Printer) error {
252 if p.Detail() {
253 p.Printf("forced error mark\n")
254 p.Printf("%q\n%s::%s",
255 m.mark.msg,
256 redact.Safe(m.mark.types[0].FamilyName),
257 redact.Safe(m.mark.types[0].Extension),
258 )
259 }
260 return m.cause
261}
262
263func encodeMark(_ context.Context, err error) (msg string, _ []string, payload proto.Message) {
264 m := err.(*withMark)

Callers

nothing calls this directly

Calls 2

DetailMethod · 0.65
PrintfMethod · 0.65

Tested by

no test coverage detected