Skip to content

Commit 5804cb0

Browse files
author
martin
committed
Remove some exception handling in goto-diff
Removes specific handling of a few kinds of exception in favour of the general handlers in parse_options_baset. This will change the exit code in a few exceptional cases but makes the code simpler and more consistent.
1 parent 461e8c7 commit 5804cb0

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/goto-diff/goto_diff_parse_options.cpp

-26
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ bool goto_diff_parse_optionst::process_goto_program(
386386
const optionst &options,
387387
goto_modelt &goto_model)
388388
{
389-
try
390389
{
391390
// Remove inline assembler; this needs to happen before
392391
// adding the library.
@@ -450,31 +449,6 @@ bool goto_diff_parse_optionst::process_goto_program(
450449
remove_skip(goto_model);
451450
}
452451

453-
catch(const char *e)
454-
{
455-
error() << e << eom;
456-
return true;
457-
}
458-
459-
catch(const std::string &e)
460-
{
461-
error() << e << eom;
462-
return true;
463-
}
464-
465-
catch(int e)
466-
{
467-
error() << "Numeric exception: " << e << eom;
468-
return true;
469-
}
470-
471-
catch(const std::bad_alloc &)
472-
{
473-
error() << "Out of memory" << eom;
474-
exit(CPROVER_EXIT_INTERNAL_OUT_OF_MEMORY);
475-
return true;
476-
}
477-
478452
return false;
479453
}
480454

0 commit comments

Comments
 (0)