chore: complete classical rule parse error log (#1839)

This commit is contained in:
ForestL
2025-02-13 17:25:45 +08:00
committed by GitHub
parent d1d846f1ab
commit ef29e4501e
3 changed files with 9 additions and 6 deletions

View File

@@ -81,8 +81,10 @@ func ParseRule(tp, payload, target string, params []string, subRules map[string]
case "MATCH":
parsed = RC.NewMatch(target)
parseErr = nil
case "":
parseErr = fmt.Errorf("missing subsequent parameters: %s", payload)
default:
parseErr = fmt.Errorf("unsupported rule type %s", tp)
parseErr = fmt.Errorf("unsupported rule type: %s", tp)
}
if parseErr != nil {