Skip to content

Commit

Permalink
Print object information on Z3TypeError (WIP)
Browse files Browse the repository at this point in the history
ref #776
  • Loading branch information
jklmnn committed Oct 12, 2022
1 parent cac97e9 commit cb02d27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rflx/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,9 @@ def z3expr(self) -> z3.BoolRef:
left = self.left.z3expr()
right = self.right.z3expr()
if not isinstance(left, z3.ArithRef) or not isinstance(right, z3.ArithRef):
raise Z3TypeError("less relation between non-arithmetic terms")
raise Z3TypeError(
f"less relation between non-arithmetic terms: {repr(left)} - {repr(right)}, {str(left)} - {str(right)}, {type(left)} - {type(right)}"
)
return left < right


Expand Down

0 comments on commit cb02d27

Please sign in to comment.