Skip to content

Commit 32f15f7

Browse files
committed
Fix update checker exception handling
1 parent 68282d0 commit 32f15f7

File tree

1 file changed

+2
-2
lines changed
  • bukkit/src/main/java/io/github/rothes/protocolstringreplacer

1 file changed

+2
-2
lines changed

bukkit/src/main/java/io/github/rothes/protocolstringreplacer/Updater.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void start() {
6363
return;
6464
}
6565
checkJson(json);
66-
} catch (IllegalStateException | NullPointerException e) {
66+
} catch (Throwable e) {
6767
ProtocolStringReplacer.error(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Error-Parsing-Json"), e);
6868
}
6969
}, 0L, 72000L);
@@ -127,7 +127,7 @@ private String getJson(String domain, int tryTime) {
127127
}
128128
errorCount = Math.max(errorCount - 1, 0);
129129
return jsonBuilder.toString();
130-
} catch (IOException e) {
130+
} catch (Throwable e) {
131131
if (tryTime == 0) {
132132
return getJson("mirror.ghproxy.com/https://raw.githubusercontent.com", ++tryTime);
133133
} else if (tryTime == 1) {

0 commit comments

Comments
 (0)