From 40772daaf4d241a71f6eba5190cf8cd03d028880 Mon Sep 17 00:00:00 2001
From: Lukas Fleischer <calcurse@cryptocrack.de>
Date: Tue, 19 Jul 2011 16:38:09 +0200
Subject: Add hint to error messages in custom_load_conf()

Include the name of the configuration variable that issued the error in
error messages that are thrown while parsing the configuration file.
This makes it a lot easier to locate syntactic and semantic errors.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
---
 src/custom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/custom.c b/src/custom.c
index 8404ae1..747d4d8 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -408,7 +408,7 @@ custom_load_conf (struct conf *conf)
 
       if (var == CUSTOM_CONF_INVALID)
         {
-          EXIT (_("configuration variable unknown"));
+          EXIT (_("configuration variable unknown: \"%s\""), name);
           /* NOTREACHED */
         }
 
@@ -423,7 +423,7 @@ custom_load_conf (struct conf *conf)
 
       if (!val || !custom_set_conf (conf, var, val))
         {
-          EXIT (_("wrong configuration variable format."));
+          EXIT (_("wrong configuration variable format for \"%s\""), name);
           /* NOTREACHED */
         }
     }
-- 
cgit v1.2.3-70-g09d2