More startup error handling

- Pass minecraft login failure message to AutoRelog bot (suggestion by
doranchak)
- Fix NullReferenceException in McTcpClient caused by SocketException in
ProxyHandler
- Refactor error handling code in Program.InitializeClient()
- More detailed error messages on network errors.
This commit is contained in:
ORelio 2015-04-20 17:26:16 +02:00
parent 791ecba454
commit 6261e7adb7
5 changed files with 48 additions and 58 deletions

View file

@ -151,8 +151,9 @@ namespace MinecraftClient
retry = true;
}
}
catch (SocketException)
catch (SocketException e)
{
ConsoleIO.WriteLineFormatted("§8" + e.Message);
Console.WriteLine("Failed to connect to this IP.");
retry = true;
}
@ -166,7 +167,7 @@ namespace MinecraftClient
}
else if (!singlecommand && Settings.interactiveMode)
{
Program.OfflineCommandPrompt();
Program.HandleOfflineMode();
}
}
}
@ -369,7 +370,8 @@ namespace MinecraftClient
foreach (ChatBot bot in bots)
will_restart |= bot.OnDisconnect(reason, message);
if (!will_restart) { Program.OfflineCommandPrompt(); }
if (!will_restart)
Program.HandleOfflineMode();
}
/// <summary>