diff options
author | Jan Maria Matejka <mq@ucw.cz> | 2018-09-11 16:55:41 +0200 |
---|---|---|
committer | Jan Maria Matejka <mq@ucw.cz> | 2018-09-11 16:58:09 +0200 |
commit | afa14f1868f2c753efdc81ce8e2c2d44e6bdd80e (patch) | |
tree | 68c418466255db01d1513ad341ccccf384981196 /sysdep/unix/main.c | |
parent | b1f6c439f55233338a5f7cca5070c70618fe7f1d (diff) |
Conf: Show the line:char position where the syntax error happens
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 8aa19fce..99cfab17 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -212,7 +212,7 @@ read_config(void) if (!unix_read_config(&conf, config_name)) { if (conf->err_msg) - die("%s, line %d: %s", conf->err_file_name, conf->err_lino, conf->err_msg); + die("%s:%d:%d %s", conf->err_file_name, conf->err_lino, conf->err_chno, conf->err_msg); else die("Unable to open configuration file %s: %m", config_name); } @@ -229,7 +229,7 @@ async_config(void) if (!unix_read_config(&conf, config_name)) { if (conf->err_msg) - log(L_ERR "%s, line %d: %s", conf->err_file_name, conf->err_lino, conf->err_msg); + log(L_ERR "%s:%d:%d %s", conf->err_file_name, conf->err_lino, conf->err_chno, conf->err_msg); else log(L_ERR "Unable to open configuration file %s: %m", config_name); config_free(conf); @@ -250,7 +250,7 @@ cmd_read_config(char *name) if (!unix_read_config(&conf, name)) { if (conf->err_msg) - cli_msg(8002, "%s, line %d: %s", conf->err_file_name, conf->err_lino, conf->err_msg); + cli_msg(8002, "%s:%d:%d %s", conf->err_file_name, conf->err_lino, conf->err_chno, conf->err_msg); else cli_msg(8002, "%s: %m", name); config_free(conf); |