Skip to content

Commit

Permalink
Merge pull request #9 from istreamlabs/recorder-test-error
Browse files Browse the repository at this point in the history
Make recorder error message more useful
  • Loading branch information
danielgtaylor authored May 14, 2018
2 parents 640908c + d099f63 commit 3711fe1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
- Put unreleased items here.

## [1.3.1] - 2018-05-14

- Add more helpful error message when `WithTest(t)` is not called on the recorder metrics client during testing.

## [1.3.0] - 2018-03-19

- Add `WithRate(float64)` to the metrics interface and to all clients that implement
Expand Down
2 changes: 1 addition & 1 deletion metrics/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (c *RecorderClient) Length() int {
// output message to help with debugging.
func (c *RecorderClient) Fatalf(format string, args ...interface{}) {
if c.test == nil {
panic("No test associated with metrics recorder")
panic("No test associated with metrics recorder, you must call `recorder.WithTest(t)`")
}
// blacklist contains a set of fully qualified function name components that
// we will filter out to keep the call stack concise.
Expand Down

0 comments on commit 3711fe1

Please sign in to comment.