[chatter] r11788 - trunk/fundev/sources/network/sockets

cgay at mccarthy.opendylan.org cgay at mccarthy.opendylan.org
Mon Apr 28 12:43:16 CEST 2008


Author: cgay
Date: Mon Apr 28 12:43:15 2008
New Revision: 11788

Modified:
   trunk/fundev/sources/network/sockets/win32-TCP-socket-accessor.dylan
Log:
job: fd
Signal better error for <connection-failed>.  It used to say "socket error".
Now it says "connection to <host>:<port> failed".  It looks like this is one
of many such bad error messages produced by win32-socket-error.  Maybe I'll
look at a more general fix at some point.

Modified: trunk/fundev/sources/network/sockets/win32-TCP-socket-accessor.dylan
==============================================================================
--- trunk/fundev/sources/network/sockets/win32-TCP-socket-accessor.dylan	(original)
+++ trunk/fundev/sources/network/sockets/win32-TCP-socket-accessor.dylan	Mon Apr 28 12:43:15 2008
@@ -173,10 +173,14 @@
 		   host-port: input-remote-port);
 	    else #f
 	    end if;
-	  win32-socket-error("win32-connect", error-code: connect-error-code,
-			     high-level-error: high-level-error, 
-			     host-address: input-remote-host,
-			     host-port: input-remote-port);
+          let name = host-name(input-remote-host) | host-address(input-remote-host);
+          win32-socket-error("win32-connect",
+                             format-string: "connection to %s:%s failed",
+                             format-arguments: list(name, input-remote-port),
+                             error-code: connect-error-code,
+                             high-level-error: high-level-error, 
+                             host-address: input-remote-host,
+                             host-port: input-remote-port);
         end if;
 	let (the-local-address :: false-or(<ipv4-address>), 
 	     the-local-port :: false-or(<integer>)) =


More information about the chatter mailing list