mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
fix stats collection over exceptions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
808855ce6b
commit
f34a54fea0
|
@ -233,10 +233,16 @@ public:
|
|||
}
|
||||
|
||||
lbool r;
|
||||
if (assumptions.empty())
|
||||
r = m_ctx->setup_and_check();
|
||||
else
|
||||
r = m_ctx->check(assumptions.size(), assumptions.c_ptr());
|
||||
try {
|
||||
if (assumptions.empty())
|
||||
r = m_ctx->setup_and_check();
|
||||
else
|
||||
r = m_ctx->check(assumptions.size(), assumptions.c_ptr());
|
||||
}
|
||||
catch(...) {
|
||||
m_ctx->collect_statistics(m_stats);
|
||||
throw;
|
||||
}
|
||||
m_ctx->collect_statistics(m_stats);
|
||||
switch (r) {
|
||||
case l_true: {
|
||||
|
@ -284,6 +290,9 @@ public:
|
|||
return;
|
||||
}
|
||||
case l_undef:
|
||||
if (m_ctx->canceled()) {
|
||||
throw tactic_exception(Z3_CANCELED_MSG);
|
||||
}
|
||||
if (m_fail_if_inconclusive)
|
||||
throw tactic_exception("smt tactic failed to show goal to be sat/unsat");
|
||||
result.push_back(in.get());
|
||||
|
|
Loading…
Reference in a new issue