Commit ab779b7a authored by take_cheeze's avatar take_cheeze

Use `mrb_print_error` to print exception instead of `mrb_p`.

parent 5bb0a1fb
......@@ -55,7 +55,7 @@ MRuby.each_target do
f.puts %Q[ mrb_load_irep(mrb2, gem_test_irep_#{g.funcname}_preload);]
end
f.puts %Q[ if (mrb2->exc) {]
f.puts %Q[ mrb_p(mrb2, mrb_obj_value(mrb2->exc));]
f.puts %Q[ mrb_print_error(mrb2);]
f.puts %Q[ exit(EXIT_FAILURE);]
f.puts %Q[ }]
f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));]
......@@ -74,7 +74,7 @@ MRuby.each_target do
f.puts %Q[ mrb_load_irep(mrb2, gem_test_irep_#{g.funcname}_#{i});]
f.puts %Q[ if (mrb2->exc) {]
f.puts %Q[ mrb_p(mrb2, mrb_obj_value(mrb2->exc));]
f.puts %Q[ mrb_print_error(mrb2);]
f.puts %Q[ exit(EXIT_FAILURE);]
f.puts %Q[ }]
f.puts %Q[ ]
......
......@@ -16,7 +16,7 @@ mrb_init_mrbtest(mrb_state *mrb)
mrbgemtest_init(mrb);
#endif
if (mrb->exc) {
mrb_p(mrb, mrb_obj_value(mrb->exc));
mrb_print_error(mrb);
exit(EXIT_FAILURE);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment