report os error also

This commit is contained in:
David Rose 2003-04-28 18:31:15 +00:00
parent c88b65d0f6
commit a345cfe8c5

View File

@ -321,7 +321,7 @@ connection_reset(const PT(Connection) &connection, PRErrorCode errcode) {
if (errcode == 0) { if (errcode == 0) {
net_cat.info() net_cat.info()
<< "Connection " << (void *)connection << "Connection " << (void *)connection
<< " was closed normally by the other end.\n"; << " was closed normally by the other end";
} else { } else {
net_cat.info() net_cat.info()
@ -331,26 +331,28 @@ connection_reset(const PT(Connection) &connection, PRErrorCode errcode) {
switch (errcode) { switch (errcode) {
case PR_CONNECT_RESET_ERROR: case PR_CONNECT_RESET_ERROR:
net_cat.info(false) net_cat.info(false)
<< "connection reset\n"; << "connection reset";
break; break;
#ifdef PR_SOCKET_SHUTDOWN_ERROR #ifdef PR_SOCKET_SHUTDOWN_ERROR
case PR_SOCKET_SHUTDOWN_ERROR: case PR_SOCKET_SHUTDOWN_ERROR:
net_cat.info(false) net_cat.info(false)
<< "socket shutdown\n"; << "socket shutdown";
break; break;
case PR_CONNECT_ABORTED_ERROR: case PR_CONNECT_ABORTED_ERROR:
net_cat.info(false) net_cat.info(false)
<< "connection aborted\n"; << "connection aborted";
break; break;
#endif #endif
default: default:
net_cat.info(false) net_cat.info(false)
<< "NSPR error code " << errcode << "\n"; << "NSPR error code " << errcode;
} }
} }
net_cat.info(false)
<< " (os error = " << PR_GetOSError() << ").\n";
} }
} }