config: a tiny bit better messages

This commit is contained in:
Přemysl Eric Janouch 2015-05-03 17:00:58 +02:00
parent 373f6333ef
commit 4eca3fb4db
1 changed files with 3 additions and 1 deletions

View File

@ -969,9 +969,11 @@ config_tokenizer_error (struct config_tokenizer *self,
if (self->report_line) if (self->report_line)
error_set (e, "near line %u, column %u: %s", error_set (e, "near line %u, column %u: %s",
self->line + 1, self->column + 1, description.str); self->line + 1, self->column + 1, description.str);
else else if (self->len)
error_set (e, "near character %u: %s", error_set (e, "near character %u: %s",
self->column + 1, description.str); self->column + 1, description.str);
else
error_set (e, "near end: %s", description.str);
str_free (&description); str_free (&description);
} }