From 333b7d247de62b23796158e54cc23a7e31e8a3d8 Mon Sep 17 00:00:00 2001 From: Jadon Fowler Date: Sun, 21 Aug 2016 18:00:17 -0700 Subject: [PATCH] Change Disconnect message to the Throwable's message Throwable#toString() returns a description of the Throwable that includes the name of the class appended to Throwable#getLocalizedMessage(), which can be used for debugging purposes. --- src/main/java/org/spacehq/packetlib/tcp/TcpSession.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/spacehq/packetlib/tcp/TcpSession.java b/src/main/java/org/spacehq/packetlib/tcp/TcpSession.java index cc74912f..30dfeef9 100644 --- a/src/main/java/org/spacehq/packetlib/tcp/TcpSession.java +++ b/src/main/java/org/spacehq/packetlib/tcp/TcpSession.java @@ -352,7 +352,7 @@ public abstract class TcpSession extends SimpleChannelInboundHandler imp } else if(cause instanceof WriteTimeoutException) { message = "Write timed out."; } else { - message = "Internal network exception."; + message = cause.toString(); } this.disconnect(message, cause);