aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-08-26 20:42:15 +0200
committerDoKM <mcazzyman@gmail.com>2021-08-26 20:42:15 +0200
commitaa02a5289fde79009bb2fb19daf95721c909e349 (patch)
tree90a8de7016a81952a325335ed24898ea082f5280 /src/main/java/io
parentcca642952abea08e4cbd294c797c88f3d38564bc (diff)
downloadNotEnoughUpdates-aa02a5289fde79009bb2fb19daf95721c909e349.tar.gz
NotEnoughUpdates-aa02a5289fde79009bb2fb19daf95721c909e349.tar.bz2
NotEnoughUpdates-aa02a5289fde79009bb2fb19daf95721c909e349.zip
Make print stacktrace only in dev mode
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java b/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java
index f7d5157f..e75eaebb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java
@@ -2,6 +2,7 @@ package io.github.moulberry.notenoughupdates.util;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import org.apache.commons.io.IOUtils;
import java.io.BufferedReader;
@@ -80,7 +81,9 @@ public class HypixelApi {
try {
consumer.accept(getApiSync(getMyApiURL()+urlS));
} catch(Exception e) {
- e.printStackTrace();
+ if(NotEnoughUpdates.INSTANCE.config.hidden.dev) {
+ e.printStackTrace();
+ }
myApiError(current);
error.run();
}