show a backtrace when when an error occurs on gem load; close #1243

parent 7921fd54
...@@ -136,6 +136,7 @@ module MRuby ...@@ -136,6 +136,7 @@ module MRuby
unless rbfiles.empty? unless rbfiles.empty?
f.puts %Q[ mrb_load_irep(mrb, gem_mrblib_irep_#{funcname});] f.puts %Q[ mrb_load_irep(mrb, gem_mrblib_irep_#{funcname});]
f.puts %Q[ if (mrb->exc) {] f.puts %Q[ if (mrb->exc) {]
f.puts %Q[ mrb_print_backtrace(mrb);]
f.puts %Q[ mrb_p(mrb, mrb_obj_value(mrb->exc));] f.puts %Q[ mrb_p(mrb, mrb_obj_value(mrb->exc));]
f.puts %Q[ exit(EXIT_FAILURE);] f.puts %Q[ exit(EXIT_FAILURE);]
f.puts %Q[ }] f.puts %Q[ }]
......
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