fix(minecraft-fabric-helper): Include value paths in error log messages

This commit is contained in:
2026-05-24 16:54:49 +02:00
parent 14c7a9a6c0
commit 48f89c9f1f
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- `minecraft-fabric-helper`: Add value paths to error log message.
- `serde-extension`, `default-extensions`: Integrate path tracking into `ReadWriteExtension`, deprecate the existing
`PatherExtension`
- `serde-extension`: Expose entry and value path in `TweedReadIssue` and the message of `TweedEntryWriteException`.
@@ -149,14 +149,14 @@ public class FabricConfigContainerHelper<T extends @Nullable Object> {
private String formatIssuesLogMessage(File file, String type, TweedReadIssue[] issues) {
String filePath = file.getAbsolutePath();
StringBuilder stringBuilder = new StringBuilder(20 + filePath.length() + type.length() + issues.length * 50);
StringBuilder stringBuilder = new StringBuilder(20 + filePath.length() + type.length() + issues.length * 70);
stringBuilder.append("Encountered ");
stringBuilder.append(type);
stringBuilder.append(" while reading ");
stringBuilder.append(filePath);
stringBuilder.append(": \n");
for (TweedReadIssue issue : issues) {
stringBuilder.append(" - ").append(issue).append("\n");
stringBuilder.append(" - at ").append(issue.valuePath()).append(": ").append(issue).append("\n");
}
return stringBuilder.toString();
}