ParseStringFilter: when failed to parse the operator, indicate the unknown operator in the error message

This commit is contained in:
gd 2024-07-06 16:20:03 +03:00
parent c39d8e5813
commit d2382e8de9
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@ ParseStringFilter(const char *&s, bool fold_case)
if (s[0] == '!' && s[1] == '=')
negated = true;
else if (s[0] != '=' || s[1] != '=')
throw std::runtime_error("'==' or '!=' expected");
throw FmtRuntimeError("Unknown filter operator: {}", s);
s = StripLeft(s + 2);
auto value = ExpectQuoted(s);