From cf5834732128d9844dca8528e03410d9c0596453 Mon Sep 17 00:00:00 2001 From: MidCoard <2624646185@qq.com> Date: Sun, 2 Oct 2022 05:59:39 +0800 Subject: [PATCH] modify unexpected exception detector --- src/main/java/top/focess/qq/core/plugin/PluginClassLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/top/focess/qq/core/plugin/PluginClassLoader.java b/src/main/java/top/focess/qq/core/plugin/PluginClassLoader.java index cf47c00..1f491fb 100644 --- a/src/main/java/top/focess/qq/core/plugin/PluginClassLoader.java +++ b/src/main/java/top/focess/qq/core/plugin/PluginClassLoader.java @@ -497,7 +497,8 @@ public boolean load() { } else if (e instanceof PluginLoadException) // this plugin is null and PluginLoadException means there is something wrong in the new instance of the plugin FocessQQ.getLogger().thrLang("exception-load-plugin-file", e); - else + else if (!(e instanceof IllegalStateException)) + // for internal load error FocessQQ.getLogger().thrLang("exception-load-plugin-unexpected-exception", e); PluginCoreClassLoader.LOADERS.remove(this); GC_SCHEDULER.run(System::gc, Duration.ofSeconds(1),"load-failed");