mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
add exception handling to easier diagnose #7418
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5168a13efa
commit
e855a50d9b
3 changed files with 17 additions and 4 deletions
|
@ -655,7 +655,7 @@ extern "C" {
|
|||
result = to_solver_ref(s)->check_sat(num_assumptions, _assumptions);
|
||||
}
|
||||
catch (z3_exception & ex) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
to_solver_ref(s)->set_reason_unknown(eh, ex);
|
||||
to_solver(s)->set_eh(nullptr);
|
||||
if (mk_c(c)->m().inc()) {
|
||||
mk_c(c)->handle_exception(ex);
|
||||
|
@ -751,8 +751,8 @@ extern "C" {
|
|||
try {
|
||||
to_solver_ref(s)->get_unsat_core(core);
|
||||
}
|
||||
catch (...) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
catch (std::exception& ex) {
|
||||
to_solver_ref(s)->set_reason_unknown(eh, ex);
|
||||
to_solver(s)->set_eh(nullptr);
|
||||
if (core.empty())
|
||||
throw;
|
||||
|
@ -877,7 +877,7 @@ extern "C" {
|
|||
}
|
||||
catch (z3_exception & ex) {
|
||||
to_solver(s)->set_eh(nullptr);
|
||||
to_solver_ref(s)->set_reason_unknown(eh);
|
||||
to_solver_ref(s)->set_reason_unknown(eh, ex);
|
||||
_assumptions.finalize(); _consequences.finalize(); _variables.finalize();
|
||||
mk_c(c)->handle_exception(ex);
|
||||
return Z3_L_UNDEF;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue