kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <>
Subject: [PATCH 2/2] accept: more informative exception on unknown family
Date: Fri, 16 Aug 2013 02:09:28 +0000	[thread overview]
Message-ID: <> (raw)

This may help us diagnose issues on strange OSes.
 ext/kgio/accept.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ext/kgio/accept.c b/ext/kgio/accept.c
index 503b5e9..67a8ded 100644
--- a/ext/kgio/accept.c
+++ b/ext/kgio/accept.c
@@ -143,7 +143,9 @@ static VALUE in_addr_set(VALUE io, struct sockaddr_storage *addr, socklen_t len)
 		host_len = (long)INET6_ADDRSTRLEN;
-		rb_raise(rb_eRuntimeError, "unsupported address family");
+		rb_raise(rb_eRuntimeError,
+		         "unsupported address family: ss_family=%lu (socklen=%ld)",
+			 (unsigned long)addr->ss_family, (long)len);
 	host = rb_str_new(NULL, host_len);
 	host_ptr = RSTRING_PTR(host);

  parent reply	other threads:[~2013-08-16  2:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16  2:09 [PATCH 0/2] minor tweaks for potentially buggy platforms Eric Wong
2013-08-16  2:09 ` [PATCH 1/2] check syscall returns against < 0 instead of == -1 Eric Wong
2013-08-16  2:09 ` Eric Wong [this message]
2013-08-16  2:15 ` [PATCH 0/2] minor tweaks for potentially buggy platforms Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).