Skip to content

Commit 0c103b9

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 0c103b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util/parse_options.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ 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+
log.error() << e.what() << messaget::eom;
123+
return CPROVER_EXIT_EXCEPTION;
124+
}
121125
catch(...)
122126
{
123127
log.error() << "Unknown exception type!" << messaget::eom;

0 commit comments

Comments
 (0)