Skip to content

Commit 6a3de84

Browse files
committed
BUG/MINOR: config-parser: default-bind report error when parsing failed
Signed-off-by: Vincent Gramer <[email protected]>
1 parent 2ce91b0 commit 6a3de84

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

config-parser/parsers/default-bind.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ type DefaultBind struct {
3232

3333
func (d *DefaultBind) Parse(line string, parts []string, comment string) (string, error) {
3434
if parts[0] == "default-bind" && len(parts) > 1 {
35-
paramsBindOptions, _ := params.ParseBindOptions(parts[1:])
35+
paramsBindOptions, err := params.ParseBindOptions(parts[1:])
36+
if err != nil {
37+
return "", &errors.ParseError{Parser: "DefaultBind", Line: line}
38+
}
3639
d.data = &types.DefaultBind{
3740
Params: paramsBindOptions,
3841
Comment: comment,

0 commit comments

Comments
 (0)