summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-03-01 16:33:01 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-03-01 16:33:01 -0800
commitc4aa3b20979ba9a6de64ce3b02281437687ce6ba (patch)
tree2d879c90d4160fa6d50f799807c3f7589a76f453 /match.c
parentc99e75b3f7458084072743aaa38b8a56197084d6 (diff)
downloadtxr-c4aa3b20979ba9a6de64ce3b02281437687ce6ba.tar.gz
txr-c4aa3b20979ba9a6de64ce3b02281437687ce6ba.tar.bz2
txr-c4aa3b20979ba9a6de64ce3b02281437687ce6ba.zip
* match.c (v_load): Check for errors during the parse and throw an exception.
Diffstat (limited to 'match.c')
-rw-r--r--match.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/match.c b/match.c
index 66325ddd..fc9746a0 100644
--- a/match.c
+++ b/match.c
@@ -3413,6 +3413,10 @@ static val v_load(match_files_ctx *c)
parse_reset(path);
yyparse();
gc_state(gc);
+
+ if (errors)
+ sem_error(specline, lit("load: errors encountered in ~s"), path, nao);
+
{
val spec = get_spec();
val result = match_files(mf_spec(*c, spec));