fix(minecraft-fabric-helper): Include value paths in error log messages
This commit is contained in:
@@ -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`.
|
||||
|
||||
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user