File tree 3 files changed +24
-11
lines changed 3 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -693,10 +693,10 @@ int bmct::do_language_agnostic_bmc(
693
693
message.error () << error_msg << message.eom ;
694
694
return CPROVER_EXIT_EXCEPTION;
695
695
}
696
- catch (... )
696
+ catch (std::runtime_error &e )
697
697
{
698
- message.error () << " unable to get solver " << message.eom ;
699
- throw std::current_exception () ;
698
+ message.error () << e. what () << message.eom ;
699
+ return CPROVER_EXIT_EXCEPTION ;
700
700
}
701
701
702
702
switch (final_result)
Original file line number Diff line number Diff line change @@ -523,10 +523,19 @@ void symex_target_equationt::convert_constraints(
523
523
{
524
524
if (step.is_constraint ())
525
525
{
526
- if (step.ignore )
527
- continue ;
528
-
529
- decision_procedure.set_to_true (step.cond_expr );
526
+ if (!step.ignore )
527
+ {
528
+ try
529
+ {
530
+ decision_procedure.set_to_true (step.cond_expr );
531
+ }
532
+ catch (const bitvector_conversion_exceptiont &conversion_exception)
533
+ {
534
+ util_throw_with_nested (
535
+ equation_conversion_exceptiont (
536
+ " Error converting constraints for step" , step));
537
+ }
538
+ }
530
539
}
531
540
}
532
541
}
Original file line number Diff line number Diff line change 12
12
#include < util/base_type.h>
13
13
#include < util/invariant.h>
14
14
15
+ #include " bv_conversion_exceptions.h"
15
16
#include " flatten_byte_operators.h"
16
17
17
18
literalt boolbvt::convert_equality (const equal_exprt &expr)
18
19
{
19
20
const bool is_base_type_eq =
20
21
base_type_eq (expr.lhs ().type (), expr.rhs ().type (), ns);
21
- DATA_INVARIANT (
22
- is_base_type_eq,
23
- std::string (" equality without matching types:\n " ) + " ######### lhs: " +
24
- expr.lhs ().pretty () + ' \n ' + " ######### rhs: " + expr.rhs ().pretty ());
22
+ if (!is_base_type_eq)
23
+ {
24
+ const std::string error_msg =
25
+ std::string (" equality without matching types:\n " ) + " ######### lhs: " +
26
+ expr.lhs ().pretty () + ' \n ' + " ######### rhs: " + expr.rhs ().pretty ();
27
+ throw bitvector_conversion_exceptiont (error_msg, expr);
28
+ }
25
29
26
30
// see if it is an unbounded array
27
31
if (is_unbounded_array (expr.lhs ().type ()))
You can’t perform that action at this time.
0 commit comments