diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 7a81287a3..e19feb339 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -342,7 +342,11 @@ class SkyHanniMod { initLogging() Runtime.getRuntime().addShutdownHook(Thread { configManager.saveConfig("shutdown-hook") }) repo = RepoManager(configManager.configDirectory) - repo.loadRepoInformation() + try { + repo.loadRepoInformation() + } catch (e: Exception) { + Exception("Error reading repo data", e).printStackTrace() + } } fun loadModule(obj: Any) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt index e1d6aa933..faefb9e33 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.data.repo import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.test.command.CopyErrorCommand import at.hannibal2.skyhanni.utils.LorenzUtils import com.google.gson.JsonObject import net.minecraft.client.Minecraft @@ -122,8 +123,7 @@ class RepoManager(private val configLocation: File) { LorenzUtils.chat("§e[SkyHanni] §a$answerMessage") } } catch (e: java.lang.Exception) { - comp.completeExceptionally(e) - LorenzUtils.error("An error occurred while trying to reload the repo! See logs for more info.") + CopyErrorCommand.logError(e, "Error reading repo data!") } } return comp |