Skip to content

Commit

Permalink
fix for collect_raises
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed May 31, 2024
1 parent 7ad7a9d commit 1133353
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion seal5/transform/collect_raises/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ def conditional(self: behav.Conditional, context):
stmt = behav.Block([]) # Replace with empty block
context.found_raise = False
else:
raise NotImplementedError
assert isinstance(stmt, behav.ProcedureCall), "Nesting raises not allowed"
assert isinstance(stmt.ref_or_name, arch.Function), "Expected function"
assert stmt.ref_or_name.name == "raise", "Expected raise operation"
stmt = behav.Block([]) # Replace with empty block
context.found_raise = False
# input("aaaa")
self.stmts[i] = stmt
# print("after", context.cond_stack)
Expand Down

0 comments on commit 1133353

Please sign in to comment.