mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Better exception catching
- Better catch in proxy handler - Better catch in StartClient (thx doranchak)
This commit is contained in:
parent
2c31efd0c9
commit
ea17ec87f1
3 changed files with 51 additions and 28 deletions
|
|
@ -57,11 +57,15 @@ namespace MinecraftClient.Proxy
|
|||
}
|
||||
else return new TcpClient(host, port);
|
||||
}
|
||||
catch (ProxyException e)
|
||||
catch (Exception e)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§8" + e.Message);
|
||||
proxy = null;
|
||||
return null;
|
||||
if (e is ProxyException || e is SocketException)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§8" + e.Message);
|
||||
proxy = null;
|
||||
return null;
|
||||
}
|
||||
else throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue