Try provide github error details
This commit is contained in:
		| @@ -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; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user