mirror of
https://github.com/Z3Prover/z3
synced 2025-08-06 11:20:26 +00:00
use std::exception as base class to z3_exception
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1957b4d991
commit
92065462b4
60 changed files with 109 additions and 111 deletions
|
@ -316,7 +316,7 @@ public:
|
|||
throw ex;
|
||||
}
|
||||
catch (z3_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ public:
|
|||
(*m_imp)(in, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ public:
|
|||
(*m_imp)(in, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
(*m_imp)(in, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -937,7 +937,7 @@ public:
|
|||
result.push_back(g.get());
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ public:
|
|||
(*m_imp)(g, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ public:
|
|||
(*m_imp)(g, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ public:
|
|||
run(in, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ void simplify_tactic::operator()(goal_ref const & in,
|
|||
m_clean = false;
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ public:
|
|||
m_simp->reduce();
|
||||
}
|
||||
catch (rewriter_exception& ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
m_goal->elim_true();
|
||||
m_goal->elim_redundancies();
|
||||
|
|
|
@ -136,7 +136,7 @@ public:
|
|||
(*m_imp)(in, result);
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
throw tactic_exception(ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ void exec(tactic & t, goal_ref const & in, goal_ref_buffer & result) {
|
|||
t.cleanup();
|
||||
}
|
||||
catch (tactic_exception & ex) {
|
||||
IF_VERBOSE(TACTIC_VERBOSITY_LVL, verbose_stream() << "(tactic-exception \"" << escaped(ex.msg()) << "\")\n");
|
||||
IF_VERBOSE(TACTIC_VERBOSITY_LVL, verbose_stream() << "(tactic-exception \"" << escaped(ex.what()) << "\")\n");
|
||||
t.cleanup();
|
||||
throw ex;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, p
|
|||
exec(t, g, r);
|
||||
}
|
||||
catch (z3_exception & ex) {
|
||||
reason_unknown = ex.msg();
|
||||
reason_unknown = ex.what();
|
||||
if (r.size() > 0) pr = r[0]->pr(0);
|
||||
return l_undef;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ protected:
|
|||
std::string m_msg;
|
||||
public:
|
||||
tactic_exception(std::string && msg) : m_msg(std::move(msg)) {}
|
||||
char const * msg() const override { return m_msg.c_str(); }
|
||||
char const * what() const override { return m_msg.c_str(); }
|
||||
};
|
||||
|
||||
#define TACTIC_CANCELED_MSG Z3_CANCELED_MSG
|
||||
|
|
|
@ -362,7 +362,7 @@ public:
|
|||
throw;
|
||||
}
|
||||
catch (z3_exception& ex) {
|
||||
IF_VERBOSE(10, verbose_stream() << ex.msg() << " in or-else\n");
|
||||
IF_VERBOSE(10, verbose_stream() << ex.what() << " in or-else\n");
|
||||
throw;
|
||||
}
|
||||
catch (const std::exception &ex) {
|
||||
|
@ -546,7 +546,7 @@ public:
|
|||
catch (tactic_exception & ex) {
|
||||
if (i == 0) {
|
||||
ex_kind = TACTIC_EX;
|
||||
ex_msg = ex.msg();
|
||||
ex_msg = ex.what();
|
||||
}
|
||||
}
|
||||
catch (z3_error & err) {
|
||||
|
@ -558,7 +558,7 @@ public:
|
|||
catch (z3_exception & z3_ex) {
|
||||
if (i == 0) {
|
||||
ex_kind = DEFAULT_EX;
|
||||
ex_msg = z3_ex.msg();
|
||||
ex_msg = z3_ex.what();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -703,7 +703,7 @@ public:
|
|||
curr_failed = true;
|
||||
failed = true;
|
||||
ex_kind = TACTIC_EX;
|
||||
ex_msg = ex.msg();
|
||||
ex_msg = ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ public:
|
|||
curr_failed = true;
|
||||
failed = true;
|
||||
ex_kind = DEFAULT_EX;
|
||||
ex_msg = z3_ex.msg();
|
||||
ex_msg = z3_ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue