Skip to content

Commit 78fe3e7

Browse files
authored
Merge pull request #3093 from hannes-steffenhagen-diffblue/refactor-rename-invalid_user_input_exception
Rename invalid_user_input_exceptiont
2 parents 1f59dd8 + 00ab3eb commit 78fe3e7

File tree

8 files changed

+19
-18
lines changed

8 files changed

+19
-18
lines changed

src/cbmc/bmc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void bmct::get_memory_model()
217217
memory_model=util_make_unique<memory_model_psot>(ns);
218218
else
219219
{
220-
throw invalid_user_input_exceptiont(
220+
throw invalid_command_line_argument_exceptiont(
221221
"invalid parameter " + mm, "--mm", "try values of sc, tso, pso");
222222
}
223223
}

src/cbmc/cbmc_solvers.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2(
166166
{
167167
if(solver==smt2_dect::solvert::GENERIC)
168168
{
169-
throw invalid_user_input_exceptiont(
169+
throw invalid_command_line_argument_exceptiont(
170170
"required filename not provided",
171171
"--outfile",
172172
"provide a filename with --outfile");
@@ -211,7 +211,7 @@ std::unique_ptr<cbmc_solverst::solvert> cbmc_solverst::get_smt2(
211211

212212
if(!*out)
213213
{
214-
throw invalid_user_input_exceptiont(
214+
throw invalid_command_line_argument_exceptiont(
215215
"failed to open file: " + filename, "--outfile");
216216
}
217217

@@ -236,7 +236,7 @@ void cbmc_solverst::no_beautification()
236236
{
237237
if(options.get_bool_option("beautify"))
238238
{
239-
throw invalid_user_input_exceptiont(
239+
throw invalid_command_line_argument_exceptiont(
240240
"the chosen solver does not support beautification", "--beautify");
241241
}
242242
}
@@ -249,18 +249,18 @@ void cbmc_solverst::no_incremental_check()
249249

250250
if(all_properties)
251251
{
252-
throw invalid_user_input_exceptiont(
252+
throw invalid_command_line_argument_exceptiont(
253253
"the chosen solver does not support incremental solving",
254254
"--all_properties");
255255
}
256256
else if(cover)
257257
{
258-
throw invalid_user_input_exceptiont(
258+
throw invalid_command_line_argument_exceptiont(
259259
"the chosen solver does not support incremental solving", "--cover");
260260
}
261261
else if(incremental_check)
262262
{
263-
throw invalid_user_input_exceptiont(
263+
throw invalid_command_line_argument_exceptiont(
264264
"the chosen solver does not support incremental solving",
265265
"--incremental-check");
266266
}

src/goto-symex/show_vcc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void show_vcc(
165165
{
166166
of.open(filename);
167167
if(!of)
168-
throw invalid_user_input_exceptiont(
168+
throw invalid_command_line_argument_exceptiont(
169169
"invalid file to read trace from: " + filename, "--outfile");
170170
}
171171

src/goto-symex/slice_by_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void symex_slice_by_tracet::read_trace(std::string filename)
124124
std::cout << "Reading trace from file " << filename << '\n';
125125
std::ifstream file(filename);
126126
if(file.fail())
127-
throw invalid_user_input_exceptiont(
127+
throw invalid_command_line_argument_exceptiont(
128128
"invalid file to read trace from: " + filename, "");
129129

130130
// In case not the first trace read

src/util/config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ bool configt::set(const cmdlinet &cmdline)
10531053
if(!(0<bv_encoding.object_bits &&
10541054
bv_encoding.object_bits<ansi_c.pointer_width))
10551055
{
1056-
throw invalid_user_input_exceptiont(
1056+
throw invalid_command_line_argument_exceptiont(
10571057
"object-bits must be positive and less than the pointer width (" +
10581058
std::to_string(ansi_c.pointer_width) + ") ",
10591059
"--object_bits");

src/util/exception_utils.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Author: Fotis Koutoulakis, [email protected]
99
#include "exception_utils.h"
1010
#include <utility>
1111

12-
std::string invalid_user_input_exceptiont::what() const
12+
std::string invalid_command_line_argument_exceptiont::what() const
1313
{
1414
std::string res;
1515
res += "Invalid User Input";
@@ -23,10 +23,11 @@ std::string invalid_user_input_exceptiont::what() const
2323
return res;
2424
}
2525

26-
invalid_user_input_exceptiont::invalid_user_input_exceptiont(
27-
std::string reason,
28-
std::string option,
29-
std::string correct_input)
26+
invalid_command_line_argument_exceptiont::
27+
invalid_command_line_argument_exceptiont(
28+
std::string reason,
29+
std::string option,
30+
std::string correct_input)
3031
: reason(std::move(reason)),
3132
option(std::move(option)),
3233
correct_input(std::move(correct_input))

src/util/exception_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class cprover_exception_baset
2828
/// Thrown when users pass incorrect command line arguments,
2929
/// for example passing no files to analysis or setting
3030
/// two mutually exclusive flags
31-
class invalid_user_input_exceptiont : public cprover_exception_baset
31+
class invalid_command_line_argument_exceptiont : public cprover_exception_baset
3232
{
3333
/// The reason this exception was generated.
3434
std::string reason;
@@ -39,7 +39,7 @@ class invalid_user_input_exceptiont : public cprover_exception_baset
3939
std::string correct_input;
4040

4141
public:
42-
invalid_user_input_exceptiont(
42+
invalid_command_line_argument_exceptiont(
4343
std::string reason,
4444
std::string option,
4545
std::string correct_input = "");

src/util/parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int parse_options_baset::main()
7171

7272
return doit();
7373
}
74-
catch(const invalid_user_input_exceptiont &e)
74+
catch(const invalid_command_line_argument_exceptiont &e)
7575
{
7676
std::cerr << e.what() << "\n";
7777
return CPROVER_EXIT_USAGE_ERROR;

0 commit comments

Comments
 (0)