From 714d21783f59b03d7d8ac5d40a430ef2dbb72a28 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Sun, 3 Oct 2021 20:11:20 -0400 Subject: exceptions: fix leftover uw_throwfs with errno. * ffi.c (mmap_wrap, mmap_op): Switch to uw_ethrowf. * sysif.c (getresgid_wrap): Same. --- ffi.c | 8 ++++---- sysif.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ffi.c b/ffi.c index b857ecb2..a77c48a4 100644 --- a/ffi.c +++ b/ffi.c @@ -6239,8 +6239,8 @@ val mmap_wrap(val type, val len, val prot, val flags, if (ad_out == MAP_FAILED) { int eno = errno; - uw_throwf(system_error_s, lit("~a: mmap failed: ~d/~s"), - self, num(eno), errno_to_str(eno), nao); + uw_ethrowf(system_error_s, lit("~a: mmap failed: ~d/~s"), + self, num(eno), errno_to_str(eno), nao); } else { val ca = make_carray(type, ad_out, nelem, nil, 0); struct carray *scry = carray_struct(ca); @@ -6306,8 +6306,8 @@ static val mmap_op(val carray, val offset_in, val size_in, if (op_fn(scry->data + off, sz, c_int(arg, self)) < 0) { int eno = errno; - uw_throwf(system_error_s, lit("~a: ~s: ~a failed: ~d/~s"), - self, carray, self, num(eno), errno_to_str(eno), nao); + uw_ethrowf(system_error_s, lit("~a: ~s: ~a failed: ~d/~s"), + self, carray, self, num(eno), errno_to_str(eno), nao); } return t; diff --git a/sysif.c b/sysif.c index 6f4ad727..13f5f2a6 100644 --- a/sysif.c +++ b/sysif.c @@ -1846,8 +1846,8 @@ static val getresgid_wrap(void) { gid_t r, e, s; if (getresgid(&r, &e, &s) != 0) - uw_throwf(system_error_s, lit("getresgid failed: ~d/~s"), - num(errno), errno_to_str(errno), nao); + uw_ethrowf(system_error_s, lit("getresgid failed: ~d/~s"), + num(errno), errno_to_str(errno), nao); return list(num(r), num(e), num(s), nao); } -- cgit v1.2.3