From 780c83f8ae2a89f4cbd38e1e9fe1678c62862be8 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 22 Apr 2002 11:53:34 +0000 Subject: Print some more informative message for unhandled return codes of socket calls. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@56 bfcf8e34-485d-4d46-a995-1fd6fa6fb178 --- src/Sockets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Sockets.c b/src/Sockets.c index 685a57a..c319e3d 100644 --- a/src/Sockets.c +++ b/src/Sockets.c @@ -16,6 +16,7 @@ #include #include +#include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ @@ -612,7 +613,7 @@ int Iso_Write(isoSocket *connection, const char *buffer, size_t count) /* The socket is marked non-blocking and the requested operation would block. */ #endif default : - fprintf(stderr, "Error: this should never happen - %s %d", __FILE__, __LINE__); + fprintf(stderr, "Unhandled error '%s': this should never happen - %s %d", strerror (errno), __FILE__, __LINE__); } } else -- cgit v1.2.3