Skip to content

Commit

Permalink
Catch remote config resolving issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Apr 10, 2024
1 parent f1853ed commit 33a3f7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group 'net.jan'
version '1.8.2-SNAPSHOT'
version '1.8.3'
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.jan.moddirector.core.util.WebGetResponse;

import java.io.*;
import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -116,6 +117,9 @@ private void handleRemoteConfig(Path configurationPath) {
Files.write(remoteConfigPath, outputStream.toByteArray());
addConfig(remoteConfigPath);
Files.delete(remoteConfigPath);
} catch(UnknownHostException e) {
director.getLogger().logThrowable(ModDirectorSeverityLevel.ERROR, LOG_DOMAIN,
"CORE", e, "Failed to resolve URL %s, skipping remote config...", remoteConfig.getUrl());
}
} catch(IOException e) {
handleConfigException(e);
Expand Down

0 comments on commit 33a3f7e

Please sign in to comment.