This commit is contained in:
Glavo 2023-02-15 23:27:59 +08:00 committed by GitHub
parent 1454ea8358
commit 5fa066de6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@
*/ */
package org.jackhuang.hmcl.ui.versions; package org.jackhuang.hmcl.ui.versions;
import com.google.gson.JsonParseException;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.beans.property.ObjectProperty; import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleObjectProperty;
@ -82,8 +83,8 @@ public class GameItem extends Control {
ModpackConfiguration<?> config = profile.getRepository().readModpackConfiguration(version); ModpackConfiguration<?> config = profile.getRepository().readModpackConfiguration(version);
if (config == null) return; if (config == null) return;
tag.set(config.getVersion()); tag.set(config.getVersion());
} catch (IOException e) { } catch (IOException | JsonParseException e) {
LOG.log(Level.WARNING, "Failed to read modpack configuration from ", e); LOG.log(Level.WARNING, "Failed to read modpack configuration from " + version, e);
} }
}, Platform::runLater) }, Platform::runLater)
.exceptionally(handleUncaught); .exceptionally(handleUncaught);