Skip to content

Commit fe1290a

Browse files
Catch and log invariant errors.
If cbmc_invariants_should_throwt is enabled, then invariants become exceptions and we should log them instead of putting them into the catch all with no information.
1 parent 5e95689 commit fe1290a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/parse_options.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ int parse_options_baset::main()
118118
log.error() << e.what() << messaget::eom;
119119
return CPROVER_EXIT_EXCEPTION;
120120
}
121+
catch(const invariant_failedt &e)
122+
{
123+
log.error() << e.what() << messaget::eom;
124+
return CPROVER_EXIT_EXCEPTION;
125+
}
121126
catch(...)
122127
{
123128
log.error() << "Unknown exception type!" << messaget::eom;

0 commit comments

Comments
 (0)