@@ -160,7 +160,10 @@ class java_bytecode_convertt:public messaget
160
160
exprt::operandst pop (unsigned n)
161
161
{
162
162
if (stack.size ()<n)
163
- throw " malformed bytecode (pop too high)" ;
163
+ {
164
+ error () << " malformed bytecode (pop too high)" << eom;
165
+ throw 0 ;
166
+ }
164
167
165
168
exprt::operandst operands;
166
169
operands.resize (n);
@@ -188,7 +191,7 @@ class java_bytecode_convertt:public messaget
188
191
codet convert_instructions (
189
192
const instructionst &, const code_typet &);
190
193
191
- static const bytecode_infot &get_bytecode_info (const irep_idt &statement);
194
+ const bytecode_infot &get_bytecode_info (const irep_idt &statement);
192
195
193
196
void generate_class_stub (const irep_idt &class_name);
194
197
void add_array_types ();
@@ -249,7 +252,10 @@ void java_bytecode_convertt::convert(const classt &c)
249
252
250
253
// add before we do members
251
254
if (symbol_table.move (new_symbol, class_symbol))
252
- throw " failed to add class symbol " +id2string (new_symbol.name );
255
+ {
256
+ error () << " failed to add class symbol " << new_symbol.name << eom;
257
+ throw 0 ;
258
+ }
253
259
254
260
// now do members
255
261
for (const auto & it : c.fields )
@@ -542,7 +548,10 @@ void java_bytecode_convertt::convert(
542
548
new_symbol.value =gen_zero (member_type);
543
549
544
550
if (symbol_table.add (new_symbol))
545
- throw " failed to add static field symbol" ;
551
+ {
552
+ error () << " failed to add static field symbol" << eom;
553
+ throw 0 ;
554
+ }
546
555
}
547
556
}
548
557
@@ -564,8 +573,9 @@ const bytecode_infot &java_bytecode_convertt::get_bytecode_info(
564
573
for (const bytecode_infot *p=bytecode_info; p->mnemonic !=0 ; p++)
565
574
if (statement==p->mnemonic ) return *p;
566
575
567
- throw std::string (" failed to find bytecode mnemonic `" )+
568
- id2string (statement)+" '" ;
576
+ error () << " failed to find bytecode mnemonic `"
577
+ << statement << ' \' ' << eom;
578
+ throw 0 ;
569
579
}
570
580
571
581
namespace {
0 commit comments