3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 04:03:39 +00:00

inherit more exceptions from std::exception

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-11-04 13:52:14 -08:00
parent a38bf3e22f
commit abd16740ce
11 changed files with 12 additions and 12 deletions

View file

@ -277,7 +277,7 @@ namespace datatype {
} }
struct invalid_datatype {}; struct invalid_datatype : public std::exception {};
sort * plugin::mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) { sort * plugin::mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) {
try { try {

View file

@ -828,7 +828,7 @@ bool demodulator_match_subst::can_rewrite(expr* n, expr* lhs) {
*/ */
struct match_args_aux_proc { struct match_args_aux_proc {
substitution & m_subst; substitution & m_subst;
struct no_match {}; struct no_match : public std::exception {};
match_args_aux_proc(substitution & s):m_subst(s) {} match_args_aux_proc(substitution & s):m_subst(s) {}

View file

@ -29,7 +29,7 @@ class scanner;
*/ */
class simple_parser { class simple_parser {
protected: protected:
struct parser_error {}; struct parser_error : public std::exception {};
struct builtin_op { struct builtin_op {
family_id m_family_id; family_id m_family_id;
decl_kind m_kind; decl_kind m_kind;

View file

@ -2456,7 +2456,7 @@ namespace qe {
} }
bool has_quantified_uninterpreted(ast_manager& m, expr* fml) { bool has_quantified_uninterpreted(ast_manager& m, expr* fml) {
struct found {}; struct found : public std::exception {};
struct proc { struct proc {
ast_manager& m; ast_manager& m;
proc(ast_manager& m):m(m) {} proc(ast_manager& m):m(m) {}

View file

@ -26,7 +26,7 @@ Revision History:
bool parse_dimacs(std::istream & s, std::ostream& err, sat::solver & solver); bool parse_dimacs(std::istream & s, std::ostream& err, sat::solver & solver);
namespace dimacs { namespace dimacs {
struct lex_error {}; struct lex_error : public std::exception {};
class stream_buffer { class stream_buffer {
std::istream & m_stream; std::istream & m_stream;

View file

@ -90,7 +90,7 @@ namespace sat {
class solver : public solver_core { class solver : public solver_core {
public: public:
struct abort_solver {}; struct abort_solver : public std::exception {};
protected: protected:
enum search_state { s_sat, s_unsat }; enum search_state { s_sat, s_unsat };

View file

@ -147,7 +147,7 @@ namespace smt {
return m_inv; return m_inv;
} }
struct is_model_value {}; struct is_model_value : public std::exception {};
void operator()(expr* n) { void operator()(expr* n) {
if (m.is_model_value(n)) { if (m.is_model_value(n)) {
throw is_model_value(); throw is_model_value();
@ -540,7 +540,7 @@ namespace smt {
return !contains_array(e); return !contains_array(e);
} }
struct found_array {}; struct found_array : public std::exception {};
expr_mark m_visited; expr_mark m_visited;
void operator()(expr* n) { void operator()(expr* n) {
if (m_array.is_array(n)) if (m_array.is_array(n))

View file

@ -215,7 +215,7 @@ struct check_logic::imp {
m_logic = logic; m_logic = logic;
} }
struct failed {}; struct failed : public std::exception {};
std::string m_last_error; std::string m_last_error;
void fail(std::string &&msg) { void fail(std::string &&msg) {

View file

@ -32,7 +32,7 @@ Revision History:
class fix_dl_var_tactic : public tactic { class fix_dl_var_tactic : public tactic {
struct is_target { struct is_target {
struct failed {}; struct failed : public std::exception {};
ast_manager & m; ast_manager & m;
arith_util & m_util; arith_util & m_util;
expr_fast_mark1 * m_visited = nullptr; expr_fast_mark1 * m_visited = nullptr;

View file

@ -86,7 +86,7 @@ class lia2pb_tactic : public tactic {
return is_target_core(n, u) && u > rational(1); return is_target_core(n, u) && u > rational(1);
} }
struct failed {}; struct failed : public std::exception {};
struct visitor { struct visitor {
imp & m_owner; imp & m_owner;

View file

@ -338,7 +338,7 @@ class bv1_blaster_tactic : public tactic {
m_rw(m, p) { m_rw(m, p) {
} }
struct not_target {}; struct not_target : public std::exception {};
struct visitor { struct visitor {
family_id m_bv_fid; family_id m_bv_fid;