Skip to content

Commit a795035

Browse files
Use structured invariant in interpreter_class.h
1 parent 69404d6 commit a795035

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/goto-programs/interpreter_class.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ Author: Daniel Kroening, [email protected]
1515
#include <stack>
1616

1717
#include <util/arith_tools.h>
18+
#include <util/exception_utils.h>
1819
#include <util/invariant.h>
19-
#include <util/std_types.h>
20-
#include <util/sparse_vector.h>
2120
#include <util/message.h>
21+
#include <util/sparse_vector.h>
22+
#include <util/std_types.h>
2223

2324
#include "goto_functions.h"
2425
#include "goto_trace.h"
@@ -279,8 +280,9 @@ class interpretert:public messaget
279280
{
280281
mp_vectort v;
281282
evaluate(expr, v);
283+
// FIXME not sure if this can happen
282284
if(v.size()!=1)
283-
throw "invalid boolean value";
285+
throw analysis_exceptiont("invalid boolean value");
284286
return v.front()!=0;
285287
}
286288

0 commit comments

Comments
 (0)