diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-12-27 00:52:33 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-12-27 00:52:33 +0200 |
commit | d18d2687d74b27583e3d09e3ff719f1e073c1732 (patch) | |
tree | 0b71cf114fea604a5b9a0611d1ba4c9a2b2f898c | |
parent | add57c075c6f747a81c142ab48d59106de822664 (diff) | |
download | grecs-d18d2687d74b27583e3d09e3ff719f1e073c1732.tar.gz grecs-d18d2687d74b27583e3d09e3ff719f1e073c1732.tar.bz2 |
Improve error reporting.
-rw-r--r-- | src/grecs-lex.l | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/grecs-lex.l b/src/grecs-lex.l index 329c725..52a15ef 100644 --- a/src/grecs-lex.l +++ b/src/grecs-lex.l @@ -382,7 +382,8 @@ grecs_parse_line_directive(char *text, grecs_locus_t *ploc, struct wordsplit ws; if (wordsplit(text, &ws, WRDSF_DEFFLAGS)) - grecs_error(ploc, 0, _("cannot parse #line line")); + grecs_error(ploc, 0, _("cannot parse #line line: %s"), + wordsplit_strerror(&ws)); else { if (ws.ws_wordc == 2) rc = assign_locus(ppoint, NULL, @@ -418,7 +419,8 @@ grecs_parse_line_directive_cpp(char *text, grecs_locus_t *ploc, struct wordsplit ws; if (wordsplit(text, &ws, WRDSF_DEFFLAGS)) { - grecs_error(ploc, 0, _("cannot parse #line line")); + grecs_error(ploc, 0, _("cannot parse #line line: %s"), + wordsplit_strerror(&ws)); return; } else if (ws.ws_wordc < 3) grecs_error(ploc, 0, _("invalid #line statement")); |