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>
This commit is contained in:
Lukas Fleischer 2011-07-19 16:38:09 +02:00
parent 6377582841
commit 40772daaf4

View File

@ -408,7 +408,7 @@ custom_load_conf (struct conf *conf)
if (var == CUSTOM_CONF_INVALID) if (var == CUSTOM_CONF_INVALID)
{ {
EXIT (_("configuration variable unknown")); EXIT (_("configuration variable unknown: \"%s\""), name);
/* NOTREACHED */ /* NOTREACHED */
} }
@ -423,7 +423,7 @@ custom_load_conf (struct conf *conf)
if (!val || !custom_set_conf (conf, var, val)) if (!val || !custom_set_conf (conf, var, val))
{ {
EXIT (_("wrong configuration variable format.")); EXIT (_("wrong configuration variable format for \"%s\""), name);
/* NOTREACHED */ /* NOTREACHED */
} }
} }