From a7b45671f5f2de0ee46c7188c0c724accf66e047 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 12 Oct 2022 16:12:03 +0700 Subject: [PATCH] hmm --- src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt index d9809360d..2a0ca3784 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/GlobalEventHandler.kt @@ -85,11 +85,12 @@ fun runIfClient(lambda: () -> Unit) { if (isClient) { lambda.invoke() } - } catch(_: ClassNotFoundException) { } catch(err: RuntimeException) { if (err.message?.startsWith("Attempted to load class") != true) { throw err } + + LOGGER.error("Unexpected classloading exception", err) } } @@ -99,11 +100,10 @@ fun runIfClient(value: V, lambda: () -> V): V { return lambda.invoke() } - return value - } catch(err: ClassNotFoundException) { return value } catch(err: RuntimeException) { if (err.message?.startsWith("Attempted to load class") == true) { + LOGGER.error("Unexpected classloading exception", err) return value }