From da0e3fccd7e8f22bdab453609ec70ab7f59744f8 Mon Sep 17 00:00:00 2001 From: Colin Wong Date: Fri, 3 Nov 2023 16:12:01 -0500 Subject: Catch gson exception (#912) --- src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java index ad0000d4..ad2a0542 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java @@ -21,6 +21,7 @@ package io.github.moulberry.notenoughupdates.util; import com.google.common.reflect.TypeToken; import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe; import io.github.moulberry.notenoughupdates.events.SidebarChangeEvent; @@ -228,6 +229,8 @@ public class SBInfo { areGamemodesLoaded = true; } catch (IOException e) { e.printStackTrace(); + } catch (JsonSyntaxException e) { + e.printStackTrace(); } } -- cgit