3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 20:38:43 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-05-17 10:42:34 -07:00
parent 93a9847815
commit d2bd92eab9
2 changed files with 25 additions and 7 deletions

View file

@ -319,7 +319,14 @@ namespace smt {
struct scoped_ctx_push {
context* c;
scoped_ctx_push(context* c): c(c) { c->push(); }
~scoped_ctx_push() { c->pop(1); }
~scoped_ctx_push() {
try {
c->pop(1);
}
catch (...) {
;
}
}
};
/**

View file

@ -193,14 +193,25 @@ namespace smt {
}
catch (z3_error & err) {
error_code = err.error_code();
ex_kind = ERROR_EX;
done = true;
if (finished_id == UINT_MAX) {
error_code = err.error_code();
ex_kind = ERROR_EX;
done = true;
}
}
catch (z3_exception & ex) {
ex_msg = ex.msg();
ex_kind = DEFAULT_EX;
done = true;
if (finished_id == UINT_MAX) {
ex_msg = ex.msg();
ex_kind = DEFAULT_EX;
done = true;
}
}
catch (...) {
if (finished_id == UINT_MAX) {
ex_msg = "unknown exception";
ex_kind = ERROR_EX;
done = true;
}
}
};