From c03511b97179a0be5a92297f9040f5d1b8b4d6f5 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sat, 4 Jan 2014 16:40:06 +0000 Subject: [PATCH] exception causes --- .../net/i2p/client/streaming/impl/I2PSocketManagerFull.java | 5 +++-- .../net/i2p/client/streaming/impl/StandardServerSocket.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java index 30a76f6b59..72ab1ff3f7 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java @@ -305,8 +305,9 @@ public class I2PSocketManagerFull implements I2PSocketManager { I2PSocket sock = connect(peer, options); return new StandardSocket(sock); } catch (I2PException i2pe) { - // fixme in 1.6 change to cause - throw new IOException(i2pe.toString()); + IOException ioe = new IOException("connect fail"); + ioe.initCause(i2pe); + throw ioe; } } diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardServerSocket.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardServerSocket.java index a2c1a91189..8ef206862c 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardServerSocket.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardServerSocket.java @@ -44,8 +44,9 @@ class StandardServerSocket extends ServerSocket { throw new IOException("No socket"); return new StandardSocket(sock); } catch (I2PException i2pe) { - // fixme in 1.6 change to cause - throw new IOException(i2pe.toString()); + IOException ioe = new IOException("accept fail"); + ioe.initCause(i2pe); + throw ioe; } } -- GitLab