summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/aizistral/nochatreports/common/config/JSONConfig.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/common/config/JSONConfig.java b/src/main/java/com/aizistral/nochatreports/common/config/JSONConfig.java
index 9c7c2e9..f8fe3b4 100644
--- a/src/main/java/com/aizistral/nochatreports/common/config/JSONConfig.java
+++ b/src/main/java/com/aizistral/nochatreports/common/config/JSONConfig.java
@@ -62,8 +62,8 @@ public abstract class JSONConfig {
NCRCore.LOGGER.fatal("Could not read config file: {}", file);
NCRCore.LOGGER.fatal("This likely indicates the file is corrupted. "
+ "You can try deleting it to fix this problem. Full stacktrace below:");
- ex.printStackTrace();
- return null;
+ NCRCore.LOGGER.catching(ex);
+ throw new RuntimeException("Could not read config file: " + file, ex);
}
}
@@ -77,7 +77,9 @@ public abstract class JSONConfig {
}
} catch (Exception ex) {
NCRCore.LOGGER.fatal("Could not write config file: {}", file);
- throw new RuntimeException(ex);
+ NCRCore.LOGGER.fatal("Full stacktrace below:");
+ NCRCore.LOGGER.catching(ex);
+ throw new RuntimeException("Could not write config file: " + file,ex);
}
}