static VALUE make_errno_exc(const char *mesg) { int n = errno; errno = 0; if (n == 0) { rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : ""); } return rb_syserr_new(n, mesg); }
void rb_syserr_fail(int e, const char *mesg) { rb_exc_raise(rb_syserr_new(e, mesg)); }