Skip to content

Commit

Permalink
inherit more exceptions from std::exception
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <[email protected]>
  • Loading branch information
NikolajBjorner committed Nov 4, 2024
1 parent a38bf3e commit abd1674
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/ast/datatype_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/ast/substitution/demodulator_rewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ bool demodulator_match_subst::can_rewrite(expr* n, expr* lhs) {
*/
struct match_args_aux_proc {
substitution & m_subst;
struct no_match {};
struct no_match : public std::exception {};

match_args_aux_proc(substitution & s):m_subst(s) {}

Expand Down
2 changes: 1 addition & 1 deletion src/parsers/util/simple_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class scanner;
*/
class simple_parser {
protected:
struct parser_error {};
struct parser_error : public std::exception {};
struct builtin_op {
family_id m_family_id;
decl_kind m_kind;
Expand Down
2 changes: 1 addition & 1 deletion src/qe/qe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,7 @@ namespace qe {
}

bool has_quantified_uninterpreted(ast_manager& m, expr* fml) {
struct found {};
struct found : public std::exception {};
struct proc {
ast_manager& m;
proc(ast_manager& m):m(m) {}
Expand Down
2 changes: 1 addition & 1 deletion src/sat/dimacs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Revision History:
bool parse_dimacs(std::istream & s, std::ostream& err, sat::solver & solver);

namespace dimacs {
struct lex_error {};
struct lex_error : public std::exception {};

class stream_buffer {
std::istream & m_stream;
Expand Down
2 changes: 1 addition & 1 deletion src/sat/sat_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace sat {

class solver : public solver_core {
public:
struct abort_solver {};
struct abort_solver : public std::exception {};
protected:
enum search_state { s_sat, s_unsat };

Expand Down
4 changes: 2 additions & 2 deletions src/smt/smt_model_finder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ namespace smt {
return m_inv;
}

struct is_model_value {};
struct is_model_value : public std::exception {};
void operator()(expr* n) {
if (m.is_model_value(n)) {
throw is_model_value();
Expand Down Expand Up @@ -540,7 +540,7 @@ namespace smt {
return !contains_array(e);
}

struct found_array {};
struct found_array : public std::exception {};
expr_mark m_visited;
void operator()(expr* n) {
if (m_array.is_array(n))
Expand Down
2 changes: 1 addition & 1 deletion src/solver/check_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ struct check_logic::imp {
m_logic = logic;
}

struct failed {};
struct failed : public std::exception {};
std::string m_last_error;

void fail(std::string &&msg) {
Expand Down
2 changes: 1 addition & 1 deletion src/tactic/arith/fix_dl_var_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Revision History:
class fix_dl_var_tactic : public tactic {

struct is_target {
struct failed {};
struct failed : public std::exception {};
ast_manager & m;
arith_util & m_util;
expr_fast_mark1 * m_visited = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/tactic/arith/lia2pb_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class lia2pb_tactic : public tactic {
return is_target_core(n, u) && u > rational(1);
}

struct failed {};
struct failed : public std::exception {};

struct visitor {
imp & m_owner;
Expand Down
2 changes: 1 addition & 1 deletion src/tactic/bv/bv1_blaster_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class bv1_blaster_tactic : public tactic {
m_rw(m, p) {
}

struct not_target {};
struct not_target : public std::exception {};

struct visitor {
family_id m_bv_fid;
Expand Down

0 comments on commit abd1674

Please sign in to comment.