Skip to content

Commit

Permalink
Add more info to Clean() err message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Harvey committed Nov 3, 2015
1 parent 14ed867 commit 02281fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opentsdb/tsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (t TagSet) Valid() bool {

func (d *DataPoint) clean() error {
if err := d.Tags.Clean(); err != nil {
return err
return fmt.Errorf("cleaning tags for metric %s: %s", d.Metric, err)
}
m, err := Clean(d.Metric)
if err != nil {
Expand Down Expand Up @@ -288,7 +288,7 @@ func (t TagSet) Clean() error {
}
vc, err := Clean(v)
if err != nil {
return fmt.Errorf("cleaning key %s: %s", v, err)
return fmt.Errorf("cleaning value %s for tag %s: %s", v, k, err)
}
if kc != k || vc != v {
delete(t, k)
Expand Down

0 comments on commit 02281fb

Please sign in to comment.