Lines Matching refs:mesg
428 setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
435 if (NIL_P(mesg)) {
436 mesg = th->errinfo;
437 if (INTERNAL_EXCEPTION_P(mesg)) JUMP_TAG(TAG_FATAL);
439 if (NIL_P(mesg)) {
440 mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
445 if (file && !NIL_P(mesg)) {
446 if (mesg == sysstack_error) {
449 rb_iv_set(mesg, "bt", at);
452 at = get_backtrace(mesg);
455 if (OBJ_FROZEN(mesg)) {
456 mesg = rb_obj_dup(mesg);
458 set_backtrace(mesg, at);
462 if (!NIL_P(mesg)) {
463 th->errinfo = mesg;
470 mesg = e;
474 e = rb_obj_as_string(mesg);
475 th->errinfo = mesg;
478 rb_obj_class(mesg), file, line, e);
482 rb_obj_class(mesg), file, e);
486 rb_obj_class(mesg), e);
491 th->errinfo = mesg;
511 EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self, 0, 0, mesg);
516 rb_longjmp(int tag, volatile VALUE mesg)
519 setup_exception(th, tag, mesg);
527 rb_exc_raise(VALUE mesg)
529 if (!NIL_P(mesg)) {
530 mesg = make_exception(1, &mesg, FALSE);
532 rb_longjmp(TAG_RAISE, mesg);
536 rb_exc_fatal(VALUE mesg)
538 if (!NIL_P(mesg)) {
539 mesg = make_exception(1, &mesg, FALSE);
541 rb_longjmp(TAG_FATAL, mesg);
595 VALUE mesg;
599 mesg = Qnil;
607 mesg = rb_check_string_type(argv[0]);
608 if (!NIL_P(mesg)) {
609 mesg = rb_exc_new3(rb_eRuntimeError, mesg);
622 mesg = rb_check_funcall(argv[0], exception, n, argv+1);
623 if (mesg == Qundef) {
632 if (!rb_obj_is_kind_of(mesg, rb_eException))
635 set_backtrace(mesg, argv[2]);
638 return mesg;
648 rb_raise_jump(VALUE mesg)
658 setup_exception(th, TAG_RAISE, mesg);