From 96a614b617bbccbe601b4ac5cd63144c70d7375a Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 7 Sep 2014 15:11:39 +0200 Subject: [PATCH] Fix ThreadAbortException beign reported to the user This exception is normal when disconnecting from the server and should be ignored. --- MinecraftClient/McTcpClient.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs index e2c1b6c6..2dcc0ca0 100644 --- a/MinecraftClient/McTcpClient.cs +++ b/MinecraftClient/McTcpClient.cs @@ -349,7 +349,11 @@ namespace MinecraftClient } catch (Exception e) { - ConsoleIO.WriteLineFormatted("§8Got error from " + bots[i].ToString() + ": " + e.ToString()); + if (!(e is ThreadAbortException)) + { + ConsoleIO.WriteLineFormatted("§8Got error from " + bots[i].ToString() + ": " + e.ToString()); + } + else throw; //ThreadAbortException should not be caught } } }