Skip to content

Commit

Permalink
Handle update errors more gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
sfPlayer1 committed Dec 13, 2023
1 parent 0850acd commit af76fe7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/net/fabricmc/meta/FabricMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import net.fabricmc.meta.data.VersionDatabase;
import net.fabricmc.meta.web.WebServer;

import javax.xml.stream.XMLStreamException;
import java.io.IOException;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
Expand All @@ -42,11 +40,11 @@ public static void main(String[] args) {
private static void update(){
try {
database = VersionDatabase.generate();
} catch (IOException | XMLStreamException e) {
if(database == null){
throw new RuntimeException(e);
} catch (Throwable t) {
if (database == null){
throw new RuntimeException(t);
} else {
e.printStackTrace();
t.printStackTrace();
}
}
}
Expand Down

0 comments on commit af76fe7

Please sign in to comment.