Output the full path in a crash report so it is easier to find the outer mod when a crash in Jar-In-Jar occurs. (#8856)

This commit is contained in:
Marc Hermans authored and GitHub committed 2022-07-20 10:56:38 -07:00
1 parent 5306471aec
commit 98d4fa6dc2
3 files changed
+3 -2

No files matched your search

@@ -64,7 +64,7 @@ public class CrashReportExtender
}
if (cause != null)
category.applyStackTrace(cause);
category.setDetail("Mod File", () -> modInfo.map(IModInfo::getOwningFile).map(t-> t.getFile().getFileName()).orElse("NO FILE INFO"));
category.setDetail("Mod File", () -> modInfo.map(IModInfo::getOwningFile).map(t-> t.getFile().getFilePath().toUri().getPath()).orElse("NO FILE INFO"));
category.setDetail("Failure message", () -> mle.getCleanMessage().replace("\n", "\n\t\t"));
category.setDetail("Mod Version", () -> modInfo.map(IModInfo::getVersion).map(Object::toString).orElse("NO MOD INFO AVAILABLE"));
category.setDetail("Mod Issue URL", () -> modInfo.map(IModInfo::getOwningFile).map(IModFileInfo.class::cast).flatMap(mfi->mfi.getConfig().<String>getConfigElement("issueTrackerURL")).orElse("NOT PROVIDED"));