summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2014-12-26 22:52:33 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-12-26 22:52:33 (GMT)
commitd18d2687d74b27583e3d09e3ff719f1e073c1732 (patch) (side-by-side diff)
tree0b71cf114fea604a5b9a0611d1ba4c9a2b2f898c /src
parentadd57c075c6f747a81c142ab48d59106de822664 (diff)
downloadgrecs-d18d2687d74b27583e3d09e3ff719f1e073c1732.tar.gz
grecs-d18d2687d74b27583e3d09e3ff719f1e073c1732.tar.bz2
Improve error reporting.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/grecs-lex.l6
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"));

Return to:

Send suggestions and report system problems to the System administrator.