From a29d887c34537a49043d468f2eca64646c8dfecc Mon Sep 17 00:00:00 2001 From: Jestan Nirojan Date: Sat, 11 Feb 2012 17:27:17 +0530 Subject: [PATCH] corrected sctp channel exception messages --- .../main/java/io/netty/channel/sctp/SctpClientChannel.java | 4 ++-- .../main/java/io/netty/channel/sctp/SctpSendBufferPool.java | 2 +- .../java/io/netty/channel/sctp/SctpServerChannelImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpClientChannel.java b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpClientChannel.java index e875e67bb3..6f6e2ab2e6 100644 --- a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpClientChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpClientChannel.java @@ -41,7 +41,7 @@ final class SctpClientChannel extends SctpChannelImpl { try { underlayingChannel = SctpChannel.open(); } catch (IOException e) { - throw new ChannelException("Failed to open a socket.", e); + throw new ChannelException("Failed to open a sctp channel.", e); } boolean success = false; @@ -56,7 +56,7 @@ final class SctpClientChannel extends SctpChannelImpl { underlayingChannel.close(); } catch (IOException e) { logger.warn( - "Failed to close a partially initialized socket.", + "Failed to close a partially initialized sctp channel.", e); } } diff --git a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpSendBufferPool.java b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpSendBufferPool.java index 07d5adc8fd..0ff9600116 100644 --- a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpSendBufferPool.java +++ b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpSendBufferPool.java @@ -43,7 +43,7 @@ final class SctpSendBufferPool { return acquire((SctpPayload) message); } else { throw new IllegalArgumentException( - "unsupported message type: " + message.getClass()); + "unsupported message type: " + message.getClass() + " required io.netty.channel.sctp.SctpPayload instance"); } } diff --git a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpServerChannelImpl.java b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpServerChannelImpl.java index 335be780bb..ca248906f0 100644 --- a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpServerChannelImpl.java +++ b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpServerChannelImpl.java @@ -62,7 +62,7 @@ class SctpServerChannelImpl extends AbstractServerChannel serverChannel = com.sun.nio.sctp.SctpServerChannel.open(); } catch (IOException e) { throw new ChannelException( - "Failed to open a server socket.", e); + "Failed to open a server sctp channel.", e); } try { @@ -72,7 +72,7 @@ class SctpServerChannelImpl extends AbstractServerChannel serverChannel.close(); } catch (IOException e2) { logger.warn( - "Failed to close a partially initialized socket.", e2); + "Failed to close a partially initialized sctp channel.", e2); } throw new ChannelException("Failed to enter non-blocking mode.", e);