From b34f72dd00f5b2b2a74a0f25d9a54f3aa22c2fa3 Mon Sep 17 00:00:00 2001 From: rashchedrin Date: Mon, 23 Mar 2020 22:36:36 +0300 Subject: [PATCH] Fix #3439, print type of value in exception msg (#3498) --- src/api/python/z3/z3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/python/z3/z3.py b/src/api/python/z3/z3.py index 4b9b4f1c1..005c7e8cb 100644 --- a/src/api/python/z3/z3.py +++ b/src/api/python/z3/z3.py @@ -1405,7 +1405,7 @@ class BoolSortRef(SortRef): return BoolVal(val, self.ctx) if z3_debug(): if not is_expr(val): - _z3_assert(is_expr(val), "True, False or Z3 Boolean expression expected. Received %s" % val) + _z3_assert(is_expr(val), "True, False or Z3 Boolean expression expected. Received %s of type %s" % (val, type(val))) if not self.eq(val.sort()): _z3_assert(self.eq(val.sort()), "Value cannot be converted into a Z3 Boolean value") return val