diff --git a/src/main/java/me/libraryaddict/disguise/utilities/updates/LDGithub.java b/src/main/java/me/libraryaddict/disguise/utilities/updates/LDGithub.java index 404f24e8..93509f6d 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/updates/LDGithub.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/updates/LDGithub.java @@ -8,6 +8,7 @@ import me.libraryaddict.disguise.utilities.DisguiseUtilities; import me.libraryaddict.disguise.utilities.LibsPremium; import java.io.BufferedReader; +import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; @@ -127,6 +128,20 @@ public class LDGithub { gitData = new Gson().fromJson(json, GithubData.class); } + catch (IOException ex) { + try (InputStream error = con.getErrorStream()) { + String line = new BufferedReader(new InputStreamReader(error, StandardCharsets.UTF_8)).lines() + .collect(Collectors.joining("\n")); + + DisguiseUtilities.getLogger().severe("Error with Github! " + line); + } + catch (Exception ex1) { + DisguiseUtilities.getLogger().severe("Error when trying to read error stream! Inception!"); + ex1.printStackTrace(); + } + + throw ex; + } String download = null;