From 7dcc5aef3fb351b3d0fb2f999ece64e41c8346e9 Mon Sep 17 00:00:00 2001 From: Gravita Date: Fri, 9 Dec 2022 21:46:05 +0700 Subject: [PATCH] [FIX] More details in error when reading launcher module config file --- .../launchserver/launchermodules/LauncherModuleLoader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java index b57bbd04..7b20a2d9 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java @@ -150,6 +150,9 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO } else { try (Reader reader = IOHelper.newReader(configPath)) { targetConfig = Launcher.gsonManager.configGson.fromJson(reader, clazz); + } catch (Exception e) { + logger.error("Error when reading config {} in module {}: {}", configPath, file, e); + return super.visitFile(file, attrs); } } if (entity.propertyMap == null) entity.propertyMap = new HashMap<>();