Updated mclo.gs lib

This commit is contained in:
RaphiMC 2025-02-21 10:37:29 +01:00
parent e9fd0ecbb7
commit 7564740fd7
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
2 changed files with 9 additions and 3 deletions

View File

@ -105,7 +105,7 @@ dependencies {
include("org.cloudburstmc.netty:netty-transport-raknet:1.0.0.CR3-SNAPSHOT") {
exclude group: "io.netty"
}
include "gs.mclo:api:4.1.1"
include "gs.mclo:api:5.0.0"
include "net.lenni0451:optconfig:1.1.1"
includeJ8(compileOnly("xyz.wagyourtail.jvmdowngrader:jvmdowngrader:1.2.2"))

View File

@ -36,6 +36,7 @@ import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.concurrent.ExecutionException;
import static net.raphimc.viaproxy.ui.ViaProxyWindow.BODY_BLOCK_PADDING;
import static net.raphimc.viaproxy.ui.ViaProxyWindow.BORDER_PADDING;
@ -189,8 +190,13 @@ public class AdvancedTab extends UITab {
} else {
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_generic", apiResponse.getError()));
}
} catch (FileNotFoundException e) {
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_not_found"));
} catch (ExecutionException e) {
if (e.getCause() instanceof FileNotFoundException) {
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_not_found"));
} else {
Logger.LOGGER.error("Failed to upload log file", e.getCause());
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_generic", e.getCause().getMessage()));
}
} catch (Throwable e) {
Logger.LOGGER.error("Failed to upload log file", e);
ViaProxyWindow.showError(I18n.get("tab.advanced.upload_latest_log.error_generic", e.getMessage()));