[FIX] More details in error when reading launcher module config file

This commit is contained in:
Gravita 2022-12-09 21:46:05 +07:00
parent ae994ebb4f
commit 7dcc5aef3f

View file

@ -150,6 +150,9 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
} else { } else {
try (Reader reader = IOHelper.newReader(configPath)) { try (Reader reader = IOHelper.newReader(configPath)) {
targetConfig = Launcher.gsonManager.configGson.fromJson(reader, clazz); 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<>(); if (entity.propertyMap == null) entity.propertyMap = new HashMap<>();