diff options
author | tradke <tradke@bfcf8e34-485d-4d46-a995-1fd6fa6fb178> | 2002-04-22 11:53:34 +0000 |
---|---|---|
committer | tradke <tradke@bfcf8e34-485d-4d46-a995-1fd6fa6fb178> | 2002-04-22 11:53:34 +0000 |
commit | 780c83f8ae2a89f4cbd38e1e9fe1678c62862be8 (patch) | |
tree | 86c6beaaf7a95ded7580a78a618abece9a2c2db7 | |
parent | 90c9a460dc8e58beb1bf3437f3dfcc85489e6538 (diff) |
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
-rw-r--r-- | src/Sockets.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <stdio.h> #include <stdlib.h> +#include <string.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #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 |