Skip to content

Commit 5fa066d

Browse files
authored
fix crash (#2124)
1 parent 1454ea8 commit 5fa066d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/GameItem.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818
package org.jackhuang.hmcl.ui.versions;
1919

20+
import com.google.gson.JsonParseException;
2021
import javafx.application.Platform;
2122
import javafx.beans.property.ObjectProperty;
2223
import javafx.beans.property.SimpleObjectProperty;
@@ -82,8 +83,8 @@ public GameItem(Profile profile, String id) {
8283
ModpackConfiguration<?> config = profile.getRepository().readModpackConfiguration(version);
8384
if (config == null) return;
8485
tag.set(config.getVersion());
85-
} catch (IOException e) {
86-
LOG.log(Level.WARNING, "Failed to read modpack configuration from ", e);
86+
} catch (IOException | JsonParseException e) {
87+
LOG.log(Level.WARNING, "Failed to read modpack configuration from " + version, e);
8788
}
8889
}, Platform::runLater)
8990
.exceptionally(handleUncaught);

0 commit comments

Comments
 (0)