You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2009/09/22 23:16:56 UTC
svn commit: r817843 -
/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
Author: markt
Date: Tue Sep 22 21:16:54 2009
New Revision: 817843
URL: http://svn.apache.org/viewvc?rev=817843&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47499
Don't swallow BindException
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=817843&r1=817842&r2=817843&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Tue Sep 22 21:16:54 2009
@@ -233,12 +233,16 @@
} else {
serverSocket = serverSocketFactory.createSocket(getPort(), getBacklog(), getAddress());
}
- } catch (BindException be) {
+ } catch (BindException orig) {
+ String msg;
if (getAddress() == null)
- throw new BindException(be.getMessage() + "<null>:" + getPort());
+ msg = orig.getMessage() + " <null>:" + getPort();
else
- throw new BindException(be.getMessage() + " " +
- getAddress().toString() + ":" + getPort());
+ msg = orig.getMessage() + " " +
+ getAddress().toString() + ":" + getPort();
+ BindException be = new BindException(msg);
+ be.initCause(orig);
+ throw be;
}
}
//if( serverTimeout >= 0 )
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org