From 60965ee92e0633e84e5e4c87c2ad38bf60302c4f Mon Sep 17 00:00:00 2001 From: Project_IO Date: Fri, 27 Sep 2024 21:37:35 +0900 Subject: [PATCH] HOTFIX: when plugin loading to occurred exception --- gradle.properties | 2 +- .../main/kotlin/net/projecttl/p/x32/kernel/CoreKernel.kt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index c3800df..9aab5fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 group=net.projecttl -version=0.2.1-SNAPSHOT +version=0.2.2-SNAPSHOT ktor_version=2.3.12 log4j_version=2.23.1 diff --git a/px32-bot-core/src/main/kotlin/net/projecttl/p/x32/kernel/CoreKernel.kt b/px32-bot-core/src/main/kotlin/net/projecttl/p/x32/kernel/CoreKernel.kt index b9a4be4..d4417bc 100644 --- a/px32-bot-core/src/main/kotlin/net/projecttl/p/x32/kernel/CoreKernel.kt +++ b/px32-bot-core/src/main/kotlin/net/projecttl/p/x32/kernel/CoreKernel.kt @@ -153,7 +153,11 @@ class CoreKernel(token: String) { fun load() { parentDir.listFiles()?.forEach { file -> - loadPlugin(file) + try { + loadPlugin(file) + } catch (ex: Exception) { + logger.error("error occurred while to plugin loading: ${ex.message}") + } } logger.info("Loaded ${plugins.size} plugins")