diff --git a/src/main/java/net/knarcraft/minecraftserverlauncher/utility/BackupUtil.java b/src/main/java/net/knarcraft/minecraftserverlauncher/utility/BackupUtil.java index 47034a6..1a752af 100644 --- a/src/main/java/net/knarcraft/minecraftserverlauncher/utility/BackupUtil.java +++ b/src/main/java/net/knarcraft/minecraftserverlauncher/utility/BackupUtil.java @@ -15,6 +15,7 @@ import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.stream.Stream; @@ -183,8 +184,9 @@ public class BackupUtil { try { alreadyCopied += backupFolder(srcFolder, destinationFolder, backupFileSize, alreadyCopied); } catch (IOException e) { - e.printStackTrace(); - gui.setStatus("Backup caused an error"); + gui.showError("Backup caused an error: " + e.getMessage()); + gui.logError(Arrays.toString(e.getStackTrace())); + BackupGUI.destroy(); backupRunning = false; } return alreadyCopied;