Call exc_debug_info() in mrb_exc_set(); ref #3610

Otherwise line number information is lacked from exceptions
raised in VM, e.g. "super called outside of method".
parent 82ab4613
......@@ -291,6 +291,10 @@ mrb_exc_set(mrb_state *mrb, mrb_value exc)
}
else {
mrb->exc = mrb_obj_ptr(exc);
if (!mrb->gc.out_of_memory) {
exc_debug_info(mrb, mrb->exc);
mrb_save_backtrace(mrb);
}
}
}
......@@ -301,10 +305,6 @@ mrb_exc_raise(mrb_state *mrb, mrb_value exc)
mrb_raise(mrb, E_TYPE_ERROR, "exception object expected");
}
mrb_exc_set(mrb, exc);
if (!mrb->gc.out_of_memory) {
exc_debug_info(mrb, mrb->exc);
mrb_save_backtrace(mrb);
}
if (!mrb->jmp) {
mrb_p(mrb, exc);
abort();
......
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