mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
add exception handling for making solver-1 discontinuation transparent, thanks to Martin, #497
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
335a1dba6e
commit
9743c188da
|
@ -212,11 +212,16 @@ public:
|
||||||
else {
|
else {
|
||||||
IF_VERBOSE(PS_VB_LVL, verbose_stream() << "(combined-solver \"using solver 2 (with timeout)\")\n";);
|
IF_VERBOSE(PS_VB_LVL, verbose_stream() << "(combined-solver \"using solver 2 (with timeout)\")\n";);
|
||||||
aux_timeout_eh eh(m_solver2.get());
|
aux_timeout_eh eh(m_solver2.get());
|
||||||
lbool r;
|
lbool r = l_undef;
|
||||||
{
|
try {
|
||||||
scoped_timer timer(m_inc_timeout, &eh);
|
scoped_timer timer(m_inc_timeout, &eh);
|
||||||
r = m_solver2->check_sat(0, 0);
|
r = m_solver2->check_sat(0, 0);
|
||||||
}
|
}
|
||||||
|
catch (z3_exception&) {
|
||||||
|
if (!eh.m_canceled) {
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((r != l_undef || !use_solver1_when_undef()) && !eh.m_canceled) {
|
if ((r != l_undef || !use_solver1_when_undef()) && !eh.m_canceled) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue