static void thread_finalize_imp(void *rcv, SEL sel) { rb_vm_thread_t *t = GetThreadPtr(rcv); if (t->exception != Qnil && !t->joined_on_exception) { fprintf(stderr, "*** Thread %p exited prematurely because of an uncaught exception:\n%s\n", t->thread, rb_str_cstr(rb_format_exception_message(t->exception))); } if (thread_finalize_imp_super != NULL) { ((void(*)(void *, SEL))thread_finalize_imp_super)(rcv, sel); } }
static VALUE rb_block_rescue(VALUE data, VALUE exc) { fprintf(stderr, "*** Dispatch block exited prematurely because of an uncaught exception:\n%s\n", rb_str_cstr(rb_format_exception_message(exc))); return Qnil; }