Skip to content

Commit 50719d5

Browse files
Petr BauchPetr Bauch
authored andcommitted
Move exception catch to parse_options_baset
1 parent dbad224 commit 50719d5

File tree

5 files changed

+5
-27
lines changed

5 files changed

+5
-27
lines changed

jbmc/src/janalyzer/janalyzer_parse_options.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Author: Daniel Kroening, [email protected]
4646
#include <langapi/mode.h>
4747

4848
#include <util/config.h>
49-
#include <util/exception_utils.h>
5049
#include <util/exit_codes.h>
5150
#include <util/options.h>
5251
#include <util/unicode.h>
@@ -638,12 +637,6 @@ bool janalyzer_parse_optionst::set_properties()
638637
::set_properties(goto_model, cmdline.get_values("property"));
639638
}
640639

641-
catch(const incorrect_goto_program_exceptiont &e)
642-
{
643-
std::cerr << e.what() << "\n";
644-
return true;
645-
}
646-
647640
catch(const char *e)
648641
{
649642
error() << e << eom;

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,6 @@ bool jbmc_parse_optionst::set_properties(goto_modelt &goto_model)
575575
::set_properties(goto_model, cmdline.get_values("property"));
576576
}
577577

578-
catch(const incorrect_goto_program_exceptiont &e)
579-
{
580-
std::cerr << e.what() << "\n";
581-
return true;
582-
}
583-
584578
catch(const char *e)
585579
{
586580
error() << e << eom;

src/cbmc/cbmc_parse_options.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Author: Daniel Kroening, [email protected]
1717
#include <memory>
1818

1919
#include <util/config.h>
20-
#include <util/exception_utils.h>
2120
#include <util/exit_codes.h>
2221
#include <util/invariant.h>
2322
#include <util/unicode.h>
@@ -542,12 +541,6 @@ bool cbmc_parse_optionst::set_properties()
542541
::set_properties(goto_model, cmdline.get_values("property"));
543542
}
544543

545-
catch(const incorrect_goto_program_exceptiont &e)
546-
{
547-
std::cerr << e.what() << "\n";
548-
return true;
549-
}
550-
551544
catch(const char *e)
552545
{
553546
error() << e << eom;

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Author: Daniel Kroening, [email protected]
5151
#include <langapi/language.h>
5252

5353
#include <util/config.h>
54-
#include <util/exception_utils.h>
5554
#include <util/exit_codes.h>
5655
#include <util/options.h>
5756
#include <util/unicode.h>
@@ -692,12 +691,6 @@ bool goto_analyzer_parse_optionst::set_properties()
692691
::set_properties(goto_model, cmdline.get_values("property"));
693692
}
694693

695-
catch(const incorrect_goto_program_exceptiont &e)
696-
{
697-
std::cerr << e.what() << "\n";
698-
return true;
699-
}
700-
701694
catch(const char *e)
702695
{
703696
error() << e << eom;

src/util/parse_options.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ int parse_options_baset::main()
7676
std::cerr << e.what() << "\n";
7777
return CPROVER_EXIT_USAGE_ERROR;
7878
}
79+
catch(const incorrect_goto_program_exceptiont &e)
80+
{
81+
std::cerr << e.what() << "\n";
82+
return CPROVER_EXIT_EXCEPTION;
83+
}
7984
catch(const cprover_exception_baset &e)
8085
{
8186
std::cerr << e.what() << '\n';

0 commit comments

Comments
 (0)