Skip to content

Commit 407bad3

Browse files
add noexcept
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
1 parent 42894f7 commit 407bad3

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/tactic/tactic_exception.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class tactic_exception : public z3_exception {
2626
std::string m_msg;
2727
public:
2828
tactic_exception(std::string && msg) : m_msg(std::move(msg)) {}
29-
char const * what() const override { return m_msg.c_str(); }
29+
char const * what() const noexcept override { return m_msg.c_str(); }
3030
};
3131

3232
#define TACTIC_CANCELED_MSG Z3_CANCELED_MSG

src/util/checked_int64.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Revision History:
2929

3030

3131
class overflow_exception : public z3_exception {
32-
char const* what() const override { return "checked_int64 overflow/underflow"; }
32+
char const* what() const noexcept override { return "checked_int64 overflow/underflow"; }
3333
};
3434

3535
template<bool CHECK>

src/util/mpff.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ class mpff_manager {
182182
static bool field() { return true; }
183183

184184
class exception : public z3_exception {
185-
char const * what() const override { return "multi-precision floating point (mpff) exception"; }
185+
char const * what() const noexcept override { return "multi-precision floating point (mpff) exception"; }
186186
};
187187

188188
class overflow_exception : public exception {
189-
char const * what() const override { return "multi-precision floating point (mpff) overflow"; }
189+
char const * what() const noexcept override { return "multi-precision floating point (mpff) overflow"; }
190190
};
191191

192192
class div0_exception : public exception {
193-
char const * what() const override { return "multi-precision floating point (mpff) division by zero"; }
193+
char const * what() const noexcept override { return "multi-precision floating point (mpff) division by zero"; }
194194
};
195195

196196
mpff_manager(unsigned prec = 2, unsigned initial_capacity = 1024);

src/util/mpfx.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ class mpfx_manager {
129129
static bool field() { return true; }
130130

131131
class exception : public z3_exception {
132-
char const * what() const override { return "multi-precision fixed point (mpfx) exception"; }
132+
char const * what() const noexcept override { return "multi-precision fixed point (mpfx) exception"; }
133133
};
134134

135135
class overflow_exception : public exception {
136-
char const * what() const override { return "multi-precision fixed point (mpfx) overflow"; }
136+
char const * what() const noexcept override { return "multi-precision fixed point (mpfx) overflow"; }
137137
};
138138

139139
class div0_exception : public exception {
140-
char const * what() const override { return "multi-precision fixed point (mpfx) division by zero"; }
140+
char const * what() const noexcept override { return "multi-precision fixed point (mpfx) division by zero"; }
141141
};
142142

143143
mpfx_manager(unsigned int_sz = 2, unsigned frac_sz = 1, unsigned initial_capacity = 1024);

0 commit comments

Comments
 (0)