Closes issue #9
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
Adds a catch to prevent the software from crashing when checking for an update fails
This commit is contained in:
parent
8476c78589
commit
c67f3bdd2c
@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* A software for managing Minecraft servers.
|
||||
*
|
||||
* @author Kristian Knarvik <kristian.knarvik@knett.no>
|
||||
* @version 1.0.0
|
||||
* @version b1.3.4
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
@ -34,8 +34,14 @@ public class Main {
|
||||
private static ServerLauncherGUI gui;
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String logFile = Main.getApplicationWorkDirectory() + File.separator + "latestrun.log";
|
||||
CommonFunctions.writeFile(logFile, "[Info]: Starting Minecraft Server Launcher v." +
|
||||
Updater.getCurrentVersion()[1]);
|
||||
try {
|
||||
Updater.checkForUpdate(updateURL, updateChannel);
|
||||
CommonFunctions.writeFile(Main.getApplicationWorkDirectory() + File.separator + "latestrun.log", "");
|
||||
} catch (IOException e) {
|
||||
CommonFunctions.appendFile(logFile, "[Warning]: Unable to complete update procedure: " + e.getMessage());
|
||||
}
|
||||
EventQueue.invokeLater(() -> {
|
||||
try {
|
||||
ServerConsoles.instantiate();
|
||||
|
Loading…
Reference in New Issue
Block a user