Added better defined panics when scenarios and steps couldn't be found

Этот коммит содержится в:
Fredrik Lönnblad 2020-03-05 14:25:05 -03:00
родитель 754a7a9a3f
коммит 551b94b6e5

4
fmt.go
Просмотреть файл

@ -213,7 +213,7 @@ func (f *basefmt) findScenario(scenarioAstID string) *messages.GherkinDocument_F
} }
} }
return nil panic("Couldn't find scenario for AST ID: " + scenarioAstID)
} }
func (f *basefmt) findBackground(scenarioAstID string) *messages.GherkinDocument_Feature_Background { func (f *basefmt) findBackground(scenarioAstID string) *messages.GherkinDocument_Feature_Background {
@ -243,7 +243,7 @@ func (f *basefmt) findStep(stepAstID string) *messages.GherkinDocument_Feature_S
} }
} }
return nil panic("Couldn't find step for AST ID: " + stepAstID)
} }
func (f *basefmt) Pickle(p *messages.Pickle) { func (f *basefmt) Pickle(p *messages.Pickle) {