summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-03 17:00:58 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-03 17:00:58 +0200
commit4eca3fb4dbd5faf8ab3929bca4d384208ab76da8 (patch)
tree346953389f26cbc30ee8ad24857d0c8ba7aa3238 /common.c
parent373f6333efbeeeee28753adeb78094ef0807efa0 (diff)
downloadxK-4eca3fb4dbd5faf8ab3929bca4d384208ab76da8.tar.gz
xK-4eca3fb4dbd5faf8ab3929bca4d384208ab76da8.tar.xz
xK-4eca3fb4dbd5faf8ab3929bca4d384208ab76da8.zip
config: a tiny bit better messages
Diffstat (limited to 'common.c')
-rw-r--r--common.c4
1 files changed, 3 insertions, 1 deletions
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);
}