MCPcopy Create free account
hub / github.com/brimdata/super / Message

Method Message

service/srverr/error.go:89–97  ·  view source on GitHub ↗

Message returns just the Err.Error() string, if present, or the Kind string description. The intent is to allow srverr users a way to avoid embedding the Kind description as happens with Error().

()

Source from the content-addressed store, hash-verified

87// string description. The intent is to allow srverr users a way to avoid
88// embedding the Kind description as happens with Error().
89func (e *Error) Message() string {
90 if e.Err != nil {
91 return e.Err.Error()
92 }
93 if e.Kind != Other {
94 return e.Kind.String()
95 }
96 return "no error"
97}
98
99// Function E generates an error from any mix of:
100// - a Kind

Callers 2

errorResponseFunction · 0.95
TestEFunction · 0.80

Calls 2

StringMethod · 0.65
ErrorMethod · 0.45

Tested by 1

TestEFunction · 0.64