mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
merge with master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
03ed33ac02
30 changed files with 129 additions and 76 deletions
|
@ -55,8 +55,8 @@ class cmd_exception : public default_exception {
|
|||
}
|
||||
public:
|
||||
cmd_exception(char const * msg):default_exception(msg), m_line(-1), m_pos(-1) {}
|
||||
cmd_exception(std::string const & msg):default_exception(msg), m_line(-1), m_pos(-1) {}
|
||||
cmd_exception(std::string const & msg, int line, int pos):default_exception(msg), m_line(line), m_pos(pos) {}
|
||||
cmd_exception(std::string && msg):default_exception(std::move(msg)), m_line(-1), m_pos(-1) {}
|
||||
cmd_exception(std::string && msg, int line, int pos):default_exception(std::move(msg)), m_line(line), m_pos(pos) {}
|
||||
cmd_exception(char const * msg, symbol const & s):
|
||||
default_exception(compose(msg,s)),m_line(-1),m_pos(-1) {}
|
||||
cmd_exception(char const * msg, symbol const & s, int line, int pos):
|
||||
|
|
|
@ -356,7 +356,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (error)
|
||||
throw exception(error_msg);
|
||||
throw exception(std::move(error_msg));
|
||||
}
|
||||
|
||||
std::string get_value(params_ref const & ps, symbol const & p) {
|
||||
|
@ -417,7 +417,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (error)
|
||||
throw exception(error_msg);
|
||||
throw exception(std::move(error_msg));
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -509,7 +509,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (error)
|
||||
throw exception(error_msg);
|
||||
throw exception(std::move(error_msg));
|
||||
}
|
||||
|
||||
void display_parameter(std::ostream & out, char const * name) {
|
||||
|
@ -550,7 +550,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (error)
|
||||
throw exception(error_msg);
|
||||
throw exception(std::move(error_msg));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ bool contains(const std::unordered_map<A, B> & map, const A& key) {
|
|||
#endif
|
||||
|
||||
namespace lp {
|
||||
|
||||
inline void throw_exception(const std::string & str) {
|
||||
throw default_exception(str);
|
||||
}
|
||||
|
|
|
@ -27,9 +27,10 @@ Revision History:
|
|||
#include "util/event_handler.h"
|
||||
#include "util/scoped_timer.h"
|
||||
|
||||
scoped_timer * g_timeout = nullptr;
|
||||
void (* g_on_timeout)() = nullptr;
|
||||
static scoped_timer * g_timeout = nullptr;
|
||||
static void (* g_on_timeout)() = nullptr;
|
||||
|
||||
namespace {
|
||||
class g_timeout_eh : public event_handler {
|
||||
public:
|
||||
void operator()(event_handler_caller_t caller_id) override {
|
||||
|
@ -46,6 +47,7 @@ public:
|
|||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void set_timeout(long ms) {
|
||||
if (g_timeout)
|
||||
|
|
|
@ -67,9 +67,6 @@ default_exception::default_exception(fmt, char const* msg, ...) {
|
|||
m_msg = out.str();
|
||||
}
|
||||
|
||||
default_exception::default_exception(std::string const & msg): m_msg(msg) {
|
||||
}
|
||||
|
||||
char const * default_exception::msg() const {
|
||||
return m_msg.c_str();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class default_exception : public z3_exception {
|
|||
std::string m_msg;
|
||||
public:
|
||||
struct fmt {};
|
||||
default_exception(std::string const& msg);
|
||||
default_exception(std::string && msg) : m_msg(std::move(msg)) {}
|
||||
default_exception(fmt, char const* msg, ...);
|
||||
~default_exception() override {}
|
||||
char const * msg() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue