Skip to content

Commit

Permalink
Fixed panic on bad runtime flags.
Browse files Browse the repository at this point in the history
An FSM is not generated if you use a matching regex.

Signed-off-by: Joaquin Fernandez Campo <[email protected]>
  • Loading branch information
xocasdashdash committed Jan 19, 2020
1 parent 5c2acb7 commit 07269ce
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 @@ -229,6 +229,9 @@ func init() {
}

func dumpFSM(mapper *mapper.MetricMapper, dumpFilename string, logger log.Logger) error {
if mapper.FSM == nil {
return fmt.Errorf("FSM is not available. Posible due to the presence of regex patterns")
}
f, err := os.Create(dumpFilename)
if err != nil {
return err
Expand Down

0 comments on commit 07269ce

Please sign in to comment.