diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-10-27 14:13:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-10-27 14:13:15 +0200 |
commit | 86faa4ece6876c9ee89e631552785cd1a46e106f (patch) | |
tree | 40d015f52446ce7a22e0fc5eb3b2400cb25ea556 /runtime | |
parent | 589744bc5742c2b8e2cb1240e3912f2702189733 (diff) | |
download | rsyslog-86faa4ece6876c9ee89e631552785cd1a46e106f.tar.gz rsyslog-86faa4ece6876c9ee89e631552785cd1a46e106f.tar.bz2 rsyslog-86faa4ece6876c9ee89e631552785cd1a46e106f.zip |
Improve syntax error messages by outputting the error token
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/rsconf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index ad588832..dcaa1ad9 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -67,6 +67,7 @@ #include "dirty.h" #include "template.h" +extern char* yytext; /* static data */ DEFobjStaticHelpers DEFobjCurrIf(ruleset) @@ -390,7 +391,7 @@ parser_errmsg(char *fmt, ...) int yyerror(char *s) { - parser_errmsg("%s", s); + parser_errmsg("%s on token '%s'", s, yytext); return 0; } void cnfDoObj(struct cnfobj *o) |