aboutsummaryrefslogtreecommitdiffstats
path: root/passes/pmgen/pmgen.py
diff options
context:
space:
mode:
Diffstat (limited to 'passes/pmgen/pmgen.py')
-rw-r--r--passes/pmgen/pmgen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/pmgen/pmgen.py b/passes/pmgen/pmgen.py
index d5e667911..39a09991d 100644
--- a/passes/pmgen/pmgen.py
+++ b/passes/pmgen/pmgen.py
@@ -286,7 +286,7 @@ def process_pmgfile(f, filename):
block["gencode"].append(rewrite_cpp(l.rstrip()))
break
- assert False
+ raise RuntimeError("'%s' statement not recognised on line %d" % (a[0], linenr))
if block["optional"]:
assert not block["semioptional"]
@@ -328,7 +328,7 @@ def process_pmgfile(f, filename):
blocks.append(block)
continue
- assert False
+ raise RuntimeError("'%s' command not recognised" % cmd)
for fn in pmgfiles:
with open(fn, "r") as f: