From: Eddie Hung Date: Fri, 20 Sep 2019 19:03:10 +0000 (-0700) Subject: More exceptions X-Git-Tag: working-ls180~1039^2~56 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1809f463fb235a5e4c137ee992712ecc8d235fdc;p=yosys.git More exceptions --- 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: