Skip to content

Commit

Permalink
Merge pull request #114 from xocasdashdash/fixed-panic-on-bad-config
Browse files Browse the repository at this point in the history
Fixed panic on bad runtime flags.
  • Loading branch information
Matthias Rampke authored Jan 21, 2020
2 parents 7d074b3 + d81bdf2 commit c4351fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ func init() {
}

func dumpFSM(mapper *mapper.MetricMapper, dumpFilename string, logger log.Logger) error {
if mapper.FSM == nil {
return fmt.Errorf("no FSM available to be dumped, possibly because the mapping contains regex patterns")
}
f, err := os.Create(dumpFilename)
if err != nil {
return err
Expand Down

0 comments on commit c4351fe

Please sign in to comment.