3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

Trace unexpected exceptions in or-else code #5746

This commit is contained in:
Nikolaj Bjorner 2022-01-02 10:22:51 -08:00
parent 5cd1fe31fd
commit 543c16c73e

View file

@ -336,6 +336,21 @@ public:
catch (tactic_exception &) {
result.reset();
}
catch (z3_error & ex) {
IF_VERBOSE(10, verbose_stream() << "z3 error: " << ex.error_code() << " in or-else\n");
throw;
}
catch (z3_exception& ex) {
IF_VERBOSE(10, verbose_stream() << ex.msg() << " in or-else\n");
throw;
}
catch (...) {
IF_VERBOSE(10, verbose_stream() << " unclassified exception in or-else\n");
// std::current_exception returns a std::exception_ptr, which apparently
// needs to be re-thrown to extract type information.
// typeid(ex).name() would be nice.
throw;
}
}
else {
t->operator()(in, result);