Fix ThreadAbortException beign reported to the user

This exception is normal when disconnecting from the server and should
be ignored.
This commit is contained in:
ORelio 2014-09-07 15:11:39 +02:00
parent 3718dad1ee
commit 96a614b617

View file

@ -348,9 +348,13 @@ namespace MinecraftClient
bots[i].Update(); bots[i].Update();
} }
catch (Exception e) catch (Exception e)
{
if (!(e is ThreadAbortException))
{ {
ConsoleIO.WriteLineFormatted("§8Got error from " + bots[i].ToString() + ": " + e.ToString()); ConsoleIO.WriteLineFormatted("§8Got error from " + bots[i].ToString() + ": " + e.ToString());
} }
else throw; //ThreadAbortException should not be caught
}
} }
} }