Skip to content

Commit

Permalink
panic if can't create report file
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava0135 committed Jul 3, 2024
1 parent 2049e28 commit 77173f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/neotest/coverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ func coverageHook() vm.OnExecHook {
}

func reportCoverage() {
f, _ := os.Create(coverProfile)
f, err := os.Create(coverProfile)
if err != nil {
panic(fmt.Sprintf("coverage: can't create file '%s' to write coverage report", coverProfile))
}
defer f.Close()
writeCoverageReport(f)
}
Expand Down

0 comments on commit 77173f5

Please sign in to comment.