mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +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
|
@ -39,6 +39,18 @@ void check_sat_result::set_reason_unknown(event_handler& eh) {
|
|||
}
|
||||
}
|
||||
|
||||
void check_sat_result::set_reason_unknown(event_handler& eh, std::exception& ex) {
|
||||
switch (eh.caller_id()) {
|
||||
case UNSET_EH_CALLER:
|
||||
if (reason_unknown() == "")
|
||||
set_reason_unknown(ex.what());
|
||||
break;
|
||||
default:
|
||||
set_reason_unknown(eh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
proof* check_sat_result::get_proof() {
|
||||
if (!m_log.empty() && !m_proof) {
|
||||
SASSERT(is_app(m_log.back()));
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
virtual std::string reason_unknown() const = 0;
|
||||
virtual void set_reason_unknown(char const* msg) = 0;
|
||||
void set_reason_unknown(event_handler& eh);
|
||||
void set_reason_unknown(event_handler& eh, std::exception& ex);
|
||||
virtual void get_labels(svector<symbol> & r) = 0;
|
||||
virtual ast_manager& get_manager() const = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue