Skip to content

Commit 4f4fc7e

Browse files
author
martin
committed
Use the callback in applications to reroute to message
This means that exceptions, invariant failures, etc. will be given in the appropriate format.
1 parent 9157fab commit 4f4fc7e

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

src/cbmc/cbmc_parse_options.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ class cbmc_parse_optionst:
121121
void get_command_line_options(optionst &);
122122
void preprocessing(const optionst &);
123123
bool set_properties();
124+
125+
virtual void error_message(const std::string &err) override
126+
{
127+
error() << err << eom;
128+
return;
129+
}
124130
};
125131

126132
#endif // CPROVER_CBMC_CBMC_PARSE_OPTIONS_H

src/goto-analyzer/goto_analyzer_parse_options.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ class goto_analyzer_parse_optionst:
181181
{
182182
return ui_message_handler.get_ui();
183183
}
184+
185+
virtual void error_message(const std::string &err) override
186+
{
187+
error() << err << eom;
188+
return;
189+
}
184190
};
185191

186192
#endif // CPROVER_GOTO_ANALYZER_GOTO_ANALYZER_PARSE_OPTIONS_H

src/goto-diff/goto_diff_parse_options.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ class goto_diff_parse_optionst:
7171
goto_modelt &goto_model);
7272

7373
void preprocessing();
74+
75+
virtual void error_message(const std::string &err) override
76+
{
77+
error() << err << eom;
78+
return;
79+
}
7480
};
7581

7682
#endif // CPROVER_GOTO_DIFF_GOTO_DIFF_PARSE_OPTIONS_H

src/goto-instrument/goto_instrument_parse_options.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ class goto_instrument_parse_optionst:
151151
{
152152
return ui_message_handler.get_ui();
153153
}
154+
155+
virtual void error_message(const std::string &err) override
156+
{
157+
error() << err << eom;
158+
return;
159+
}
154160
};
155161

156162
#endif // CPROVER_GOTO_INSTRUMENT_GOTO_INSTRUMENT_PARSE_OPTIONS_H

0 commit comments

Comments
 (0)