diff --git a/src/main/java/io/gitlab/jfronny/googlechat/GoogleChat.java b/src/main/java/io/gitlab/jfronny/googlechat/GoogleChat.java index da75488..609327f 100644 --- a/src/main/java/io/gitlab/jfronny/googlechat/GoogleChat.java +++ b/src/main/java/io/gitlab/jfronny/googlechat/GoogleChat.java @@ -2,6 +2,8 @@ package io.gitlab.jfronny.googlechat; import io.gitlab.jfronny.commons.io.cache.FixedSizeMap; import io.gitlab.jfronny.commons.logging.Logger; +import io.gitlab.jfronny.commons.throwable.Coerce; +import io.gitlab.jfronny.commons.throwable.Try; import io.gitlab.jfronny.libjf.translate.api.Language; import io.gitlab.jfronny.libjf.translate.api.TranslateService; import net.fabricmc.api.EnvType; @@ -30,7 +32,7 @@ public class GoogleChat implements ModInitializer { @Override public void onInitialize() { - ForkJoinPool.commonPool().execute(() -> TRANSLATE_SERVICE = TranslateService.getConfigured()); + ForkJoinPool.commonPool().execute(Try.handle(Coerce.runnable(() -> TRANSLATE_SERVICE = TranslateService.getConfigured()), e -> LOGGER.error("Could not initialize translation service", e))); } public static void onConfigChange() {