aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-08-25 21:23:14 +1000
committerGitHub <noreply@github.com>2024-08-25 13:23:14 +0200
commitf734de35665a7133b372d2a05d43a6e2c467431f (patch)
treeafdde64df576d91b58b3b1a4863bf8450e3c900b
parentcf83b2d5620c44a3ab3d0a1fb8c639d4b0c2ac41 (diff)
downloadnotenoughupdates-f734de35665a7133b372d2a05d43a6e2c467431f.tar.gz
notenoughupdates-f734de35665a7133b372d2a05d43a6e2c467431f.tar.bz2
notenoughupdates-f734de35665a7133b372d2a05d43a6e2c467431f.zip
meta: add repo commit and name to kaboom crashlog (#1341)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrashRecoveryPage.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrashRecoveryPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrashRecoveryPage.java
index 66b5c3e2..59bc1e44 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrashRecoveryPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrashRecoveryPage.java
@@ -20,6 +20,7 @@
package io.github.moulberry.notenoughupdates.profileviewer;
import io.github.moulberry.moulconfig.internal.ClipboardUtils;
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils;
import io.github.moulberry.notenoughupdates.util.Rectangle;
import io.github.moulberry.notenoughupdates.util.Utils;
@@ -58,10 +59,16 @@ public class CrashRecoveryPage extends GuiProfileViewerPage {
crashReport = new CrashReport("NEU Profile Viewer crashed", exception);
val parameters = crashReport.makeCategory("Profile Viewer Parameters");
- parameters.addCrashSection("Viewed Player", (profile == null ? "null" : profile.getUuid()));
+ parameters.addCrashSection("Viewed Player", getInstance().getEntityPlayer().getName());
+ parameters.addCrashSection("Viewed Player UUID", (profile == null ? "null" : profile.getUuid()));
parameters.addCrashSection("Viewed Profile", GuiProfileViewer.getProfileName());
parameters.addCrashSection("Timestamp", timestamp);
parameters.addCrashSection("Last Viewed Page", lastViewedPage);
+ if (NotEnoughUpdates.INSTANCE.manager.onBackupRepo) {
+ parameters.addCrashSection("Repo Commit", "Using Backup");
+ } else {
+ parameters.addCrashSection("Repo Commit", NotEnoughUpdates.INSTANCE.manager.latestRepoCommit);
+ }
Bootstrap.printToSYSOUT(crashReport.getCompleteReport());
}
@@ -82,7 +89,8 @@ public class CrashRecoveryPage extends GuiProfileViewerPage {
drawString("§cJoin our support server at §adiscord.gg/moulberry§c.");
val profile = GuiProfileViewer.getProfile();
- drawString("Viewed Player: " + (profile == null ? "null" : profile.getUuid()));
+ drawString("Viewed Player: " + getInstance().getEntityPlayer().getName());
+ drawString("Viewed Player UUID: " + (profile == null ? "null" : profile.getUuid()));
drawString("Viewed Profile: " + GuiProfileViewer.getProfileName());
drawString("Timestamp: " + timestamp);