Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mechairoi committed Oct 26, 2015
1 parent 64e8e9f commit 26ddd9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions check-procs/check_procs.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func getProcs() (proc []procState, err error) {
// output, _ := exec.Command("cat", "./wmic2.csv").Output()
r := csv.NewReader(strings.NewReader(string(output[1:])))
records, err := r.ReadAll()
if (err != nil) {
return procs, nil
}
for _, record := range records[1:] {
proc, err := parsePerfProc(record)
if err != nil {
Expand Down

0 comments on commit 26ddd9e

Please sign in to comment.