From: Eddie Hung Date: Thu, 12 Sep 2019 00:06:37 +0000 (-0700) Subject: Raise a RuntimeError instead of AssertionError X-Git-Tag: working-ls180~1039^2~122 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4369fc17d03d5c1db84823a37ff0f56eb1477e8f;p=yosys.git Raise a RuntimeError instead of AssertionError --- diff --git a/passes/pmgen/pmgen.py b/passes/pmgen/pmgen.py index 573722d68..335d26f16 100644 --- a/passes/pmgen/pmgen.py +++ b/passes/pmgen/pmgen.py @@ -305,7 +305,8 @@ def process_pmgfile(f, filename): block["states"] = set() for s in line.split()[1:]: - assert s in state_types[current_pattern] + if s not in state_types[current_pattern]: + raise RuntimeError("'%s' not in state_types" % s) block["states"].add(s) codetype = "code"