A ceph.conf line with "key" and no "= value" currently shows
"unexpected character while parsing putative key value,
at char N line M". There's no reason it can't be clearer.
Fixes: #4229
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
case ACCEPT_KEY:
if ((((c == '#') || (c == ';')) && (!escaping)) || (c == '\0')) {
ostringstream oss;
- oss << "unexpected character while parsing putative key value, "
- << "at char " << (l - line) << ", line " << line_no;
+ if (c == '\0') {
+ oss << "end of key=val line " << line_no
+ << " reached, no \"=val\" found...missing =?";
+ } else {
+ oss << "unexpected character while parsing putative key value, "
+ << "at char " << (l - line) << ", line " << line_no;
+ }
errors->push_back(oss.str());
return NULL;
}