aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBruce Yinhe <[email protected]>2014-07-24 17:22:53 +0200
committerBruce Yinhe <[email protected]>2014-07-24 17:22:53 +0200
commit7bb870b42928264cab08977349e2f8bf78645c1b (patch)
treef810e2cae9dabc4c46fa67527e7ef882bea5b14a /lib
parent1b9383a8dbc03473860dfaacc7a02fbc8b1b1185 (diff)
parent974725842d5cb5cc6a7ead3069978d05d04070f2 (diff)
downloadotp-7bb870b42928264cab08977349e2f8bf78645c1b.tar.gz
otp-7bb870b42928264cab08977349e2f8bf78645c1b.tar.bz2
otp-7bb870b42928264cab08977349e2f8bf78645c1b.zip
Merge branch 'garret-smith/gs-jinterface-exceptions' into maint
OTP-12075 * garret-smith/gs-jinterface-exceptions: Include the cause when raising a new IOException
Diffstat (limited to 'lib')
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
index 7aa30eef4a..85d303689f 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
@@ -959,7 +959,9 @@ public abstract class AbstractConnection extends Thread {
} catch (final Exception e) {
final String nn = peer.node();
close();
- throw new IOException("Error accepting connection from " + nn);
+ IOException ioe = new IOException("Error accepting connection from " + nn);
+ ioe.initCause(e);
+ throw ioe;
}
if (traceLevel >= handshakeThreshold) {
System.out.println("<- MD5 ACCEPTED " + peer.host());
@@ -990,7 +992,9 @@ public abstract class AbstractConnection extends Thread {
throw ae;
} catch (final Exception e) {
close();
- throw new IOException("Cannot connect to peer node");
+ IOException ioe = new IOException("Cannot connect to peer node");
+ ioe.initCause(e);
+ throw ioe;
}
}