Skip to content

Commit

Permalink
chore: improve error message by wrapping error
Browse files Browse the repository at this point in the history
  • Loading branch information
katcipis committed Jan 1, 2024
1 parent 438946f commit 5b19e28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ func Stat(oldres BenchResults, newres BenchResults) ([]StatResult, error) {
func StatModule(runBench BenchRunner, name string, oldversion, newversion string) ([]StatResult, error) {
oldresults, err := benchModule(runBench, name, oldversion)
if err != nil {
return nil, fmt.Errorf("running bench for old module: %v", err)
return nil, fmt.Errorf("running bench for old module: %w", err)
}

newresults, err := benchModule(runBench, name, newversion)
if err != nil {
return nil, fmt.Errorf("running bench for new module: %v", err)
return nil, fmt.Errorf("running bench for new module: %w", err)
}

return Stat(oldresults, newresults)
Expand Down

0 comments on commit 5b19e28

Please sign in to comment.