Skip to content

Commit abd1674

Browse files
committedNov 4, 2024
inherit more exceptions from std::exception
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent a38bf3e commit abd1674

11 files changed

+12
-12
lines changed
 

Diff for: ‎src/ast/datatype_decl_plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ namespace datatype {
277277
}
278278

279279

280-
struct invalid_datatype {};
280+
struct invalid_datatype : public std::exception {};
281281

282282
sort * plugin::mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) {
283283
try {

Diff for: ‎src/ast/substitution/demodulator_rewriter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ bool demodulator_match_subst::can_rewrite(expr* n, expr* lhs) {
828828
*/
829829
struct match_args_aux_proc {
830830
substitution & m_subst;
831-
struct no_match {};
831+
struct no_match : public std::exception {};
832832

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

Diff for: ‎src/parsers/util/simple_parser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class scanner;
2929
*/
3030
class simple_parser {
3131
protected:
32-
struct parser_error {};
32+
struct parser_error : public std::exception {};
3333
struct builtin_op {
3434
family_id m_family_id;
3535
decl_kind m_kind;

Diff for: ‎src/qe/qe.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2456,7 +2456,7 @@ namespace qe {
24562456
}
24572457

24582458
bool has_quantified_uninterpreted(ast_manager& m, expr* fml) {
2459-
struct found {};
2459+
struct found : public std::exception {};
24602460
struct proc {
24612461
ast_manager& m;
24622462
proc(ast_manager& m):m(m) {}

Diff for: ‎src/sat/dimacs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Revision History:
2626
bool parse_dimacs(std::istream & s, std::ostream& err, sat::solver & solver);
2727

2828
namespace dimacs {
29-
struct lex_error {};
29+
struct lex_error : public std::exception {};
3030

3131
class stream_buffer {
3232
std::istream & m_stream;

Diff for: ‎src/sat/sat_solver.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace sat {
9090

9191
class solver : public solver_core {
9292
public:
93-
struct abort_solver {};
93+
struct abort_solver : public std::exception {};
9494
protected:
9595
enum search_state { s_sat, s_unsat };
9696

Diff for: ‎src/smt/smt_model_finder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ namespace smt {
147147
return m_inv;
148148
}
149149

150-
struct is_model_value {};
150+
struct is_model_value : public std::exception {};
151151
void operator()(expr* n) {
152152
if (m.is_model_value(n)) {
153153
throw is_model_value();
@@ -540,7 +540,7 @@ namespace smt {
540540
return !contains_array(e);
541541
}
542542

543-
struct found_array {};
543+
struct found_array : public std::exception {};
544544
expr_mark m_visited;
545545
void operator()(expr* n) {
546546
if (m_array.is_array(n))

Diff for: ‎src/solver/check_logic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ struct check_logic::imp {
215215
m_logic = logic;
216216
}
217217

218-
struct failed {};
218+
struct failed : public std::exception {};
219219
std::string m_last_error;
220220

221221
void fail(std::string &&msg) {

Diff for: ‎src/tactic/arith/fix_dl_var_tactic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Revision History:
3232
class fix_dl_var_tactic : public tactic {
3333

3434
struct is_target {
35-
struct failed {};
35+
struct failed : public std::exception {};
3636
ast_manager & m;
3737
arith_util & m_util;
3838
expr_fast_mark1 * m_visited = nullptr;

Diff for: ‎src/tactic/arith/lia2pb_tactic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class lia2pb_tactic : public tactic {
8686
return is_target_core(n, u) && u > rational(1);
8787
}
8888

89-
struct failed {};
89+
struct failed : public std::exception {};
9090

9191
struct visitor {
9292
imp & m_owner;

Diff for: ‎src/tactic/bv/bv1_blaster_tactic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ class bv1_blaster_tactic : public tactic {
338338
m_rw(m, p) {
339339
}
340340

341-
struct not_target {};
341+
struct not_target : public std::exception {};
342342

343343
struct visitor {
344344
family_id m_bv_fid;

0 commit comments

Comments
 (0)