Author: remm
Date: Fri Feb 17 04:47:40 2006
New Revision: 378498
URL: http://svn.apache.org/viewcvs?rev=378498&view=rev
Log:
- Update error reports, including the error codes (just in case we get a MS
style "Unknown error").
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
URL:
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378498&r1=378497&r2=378498&view=diff
==============================================================================
---
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
(original)
+++
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Fri Feb 17 04:47:40 2006
@@ -538,12 +538,12 @@
// Bind the server socket
int ret = Socket.bind(serverSock, inetAddress);
if (ret != 0) {
- throw new Exception(sm.getString("endpoint.init.bind",
Error.strerror(ret)));
+ throw new Exception(sm.getString("endpoint.init.bind", "" + ret,
Error.strerror(ret)));
}
// Start listening on the server socket
ret = Socket.listen(serverSock, backlog);
if (ret != 0) {
- throw new Exception(sm.getString("endpoint.init.listen",
Error.strerror(ret)));
+ throw new Exception(sm.getString("endpoint.init.listen", "" + ret,
Error.strerror(ret)));
}
if (OS.IS_WIN32 || OS.IS_WIN64) {
// On Windows set the reuseaddr flag after the bind/listen
@@ -1079,7 +1079,11 @@
} else if (rv < 0) {
/* Any non timeup error is critical */
if (-rv != Status.TIMEUP) {
- log.error(sm.getString("endpoint.poll.fail",
Error.strerror(-rv)));
+ int errn = -rv;
+ if (errn > Status.APR_OS_START_USERERR) {
+ errn -= Status.APR_OS_START_USERERR;
+ }
+ log.error(sm.getString("endpoint.poll.fail", "" +
(-rv), Error.strerror(-rv)));
// Handle poll critical failure
synchronized (this) {
destroy();
@@ -1411,7 +1415,7 @@
sendfileData.put(new Long(data.socket),
data);
sendfileCount++;
} else {
-
log.warn(sm.getString("endpoint.sendfile.addfail", Error.strerror(rv)));
+
log.warn(sm.getString("endpoint.sendfile.addfail", "" + rv,
Error.strerror(rv)));
// Can't do anything: close the socket
right away
Socket.destroy(data.socket);
}
@@ -1471,7 +1475,7 @@
if (-rv == Status.TIMEUP)
rv = 0;
else {
- log.error(sm.getString("endpoint.poll.fail",
Error.strerror(-rv)));
+ log.error(sm.getString("endpoint.poll.fail", "" +
(-rv), Error.strerror(-rv)));
// Handle poll critical failure
synchronized (this) {
destroy();
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL:
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=378498&r1=378497&r2=378498&view=diff
==============================================================================
---
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
(original)
+++
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties
Fri Feb 17 04:47:40 2006
@@ -11,14 +11,14 @@
endpoint.debug.unlock=Caught exception trying to unlock accept on port {0}
endpoint.err.close=Caught exception trying to close socket
endpoint.noProcessor=No Processors - worker thread dead!
-endpoint.init.bind=Socket bind failed: {0}
-endpoint.init.listen=Socket listen failed: {0}
+endpoint.init.bind=Socket bind failed: [{0}] {1}
+endpoint.init.listen=Socket listen failed: [{0}] {1}
endpoint.accept.fail=Socket accept failed
endpoint.poll.limitedpollsize=Failed to create poller with specified size,
uses 62 instead
endpoint.poll.initfail=Poller creation failed
-endpoint.poll.fail=Critical poller failure ({0}), restarting poller
+endpoint.poll.fail=Critical poller failure (restarting poller): [{0}] {1}
endpoint.poll.error=Unexpected poller error
endpoint.sendfile.error=Unexpected sendfile error
-endpoint.sendfile.addfail=Sednfile failure with status {0}
+endpoint.sendfile.addfail=Sednfile failure: [{0}] {1}
endpoint.sendfile.nosupport=Disabling sendfile, since either the APR version
or the system doesn't support it
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]