MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Append

Method Append

base/error.go:316–333  ·  view source on GitHub ↗

Append adds an error to the set. If err is a *MultiError, the inner errors are added to the set individually

(err error)

Source from the content-addressed store, hash-verified

314// Append adds an error to the set. If err is a *MultiError, the inner errors are added to
315// the set individually
316func (me *MultiError) Append(err error) *MultiError {
317 if me == nil {
318 me = &MultiError{
319 Errors: make([]error, 0),
320 }
321 }
322 switch typedErr := err.(type) {
323 case nil:
324 return me
325 case *MultiError:
326 for _, e := range typedErr.Errors {
327 me.Errors = append(me.Errors, e)
328 }
329 default:
330 me.Errors = append(me.Errors, err)
331 }
332 return me
333}
334
335// Error implements the error interface, and formats the errors one per line
336func (me *MultiError) Error() string {

Callers 15

NewAuditLoggerFunction · 0.95
validateAuditEventsFunction · 0.95
mandatoryFieldsPresentFunction · 0.95
TestMultiErrorFunction · 0.95
RotateFilenamesIfNeededFunction · 0.95
StatsMethod · 0.95
setupServerConfigFunction · 0.95
validateMethod · 0.95
PostUpgradeMethod · 0.95

Calls

no outgoing calls

Tested by 3

validateAuditEventsFunction · 0.76
TestMultiErrorFunction · 0.76
TestExpandEnvFunction · 0.64