@@ -75,40 +75,29 @@ Author: Martin Brain, martin.brain@diffblue.com
75
75
class invariant_failedt
76
76
{
77
77
private:
78
- std::string get_invariant_failed_message (
79
- const std::string &file,
80
- const std::string &function,
81
- int line,
82
- const std::string &backtrace,
83
- const std::string &reason) const ;
84
-
85
- public:
86
78
const std::string file;
87
79
const std::string function;
88
80
const int line;
89
81
const std::string backtrace;
90
- const std::string reason;
91
82
const std::string condition;
83
+ const std::string reason;
92
84
93
- std::string what () const noexcept
94
- {
95
- return get_invariant_failed_message (
96
- file, function, line, backtrace, reason);
97
- };
85
+ public:
86
+ std::string what () const noexcept ;
98
87
99
88
invariant_failedt (
100
89
const std::string &_file,
101
90
const std::string &_function,
102
91
int _line,
103
92
const std::string &_backtrace,
104
- const std::string &_reason ,
105
- const std::string &_condition )
93
+ const std::string &_condition ,
94
+ const std::string &_reason )
106
95
: file(_file),
107
96
function (_function),
108
97
line(_line),
109
98
backtrace(_backtrace),
110
- reason(_reason ),
111
- condition(_condition )
99
+ condition(_condition ),
100
+ reason(_reason )
112
101
{
113
102
}
114
103
};
@@ -172,8 +161,8 @@ invariant_violated_structured(
172
161
function,
173
162
line,
174
163
backtrace,
175
- std::forward<Params>(params)... ,
176
- condition );
164
+ condition ,
165
+ std::forward<Params>(params)... );
177
166
// We now have a structured exception ready to use;
178
167
// in future this is the place to put a 'throw'.
179
168
report_exception_to_stderr (to_throw);
@@ -232,8 +221,8 @@ invariant_violated_string(
232
221
__FILE__, \
233
222
__this_function__, \
234
223
__LINE__, \
235
- __VA_ARGS__, \
236
- #CONDITION ); /* NOLINT */ \
224
+ #CONDITION, \
225
+ __VA_ARGS__ ); /* NOLINT */ \
237
226
} while (false )
238
227
239
228
#endif // End CPROVER_DO_NOT_CHECK / CPROVER_ASSERT / ... if block
0 commit comments