use AddError everywhere (#2372)

This commit is contained in:
Patrick Hemmer
2017-04-24 14:13:26 -04:00
committed by Daniel Nelson
parent 06199523ac
commit 5ebe43f86f
95 changed files with 341 additions and 531 deletions

View File

@@ -104,9 +104,7 @@ func (r *Riak) Gather(acc telegraf.Accumulator) error {
// Range over all servers, gathering stats. Returns early in case of any error.
for _, s := range r.Servers {
if err := r.gatherServer(s, acc); err != nil {
return err
}
acc.AddError(r.gatherServer(s, acc))
}
return nil