Skip to content

Commit

Permalink
feat: show a better error message upon crash
Browse files Browse the repository at this point in the history
  • Loading branch information
boriel committed Nov 26, 2024
1 parent a5ac454 commit 3f63a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/z80/peephole/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def __init__(self, expression):
expression[2] = Evaluator(expression[2])
else: # It's a list
assert len(expression) % 2 # Must be odd length
assert all(x == FN.OP_COMMA for i, x in enumerate(expression) if i % 2)
assert all(x == FN.OP_COMMA for i, x in enumerate(expression) if i % 2), f"Invalid expression {expression}"
self.expression = [Evaluator(x) if not i % 2 else x for i, x in enumerate(expression)]

@staticmethod
Expand Down

0 comments on commit 3f63a11

Please sign in to comment.