From 4eca3fb4dbd5faf8ab3929bca4d384208ab76da8 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sun, 3 May 2015 17:00:58 +0200
Subject: config: a tiny bit better messages
---
common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common.c b/common.c
index a8a4afc..629b31b 100644
--- a/common.c
+++ b/common.c
@@ -969,9 +969,11 @@ config_tokenizer_error (struct config_tokenizer *self,
if (self->report_line)
error_set (e, "near line %u, column %u: %s",
self->line + 1, self->column + 1, description.str);
- else
+ else if (self->len)
error_set (e, "near character %u: %s",
self->column + 1, description.str);
+ else
+ error_set (e, "near end: %s", description.str);
str_free (&description);
}
--
cgit v1.2.3-70-g09d2