Add exception reporting event

This commit is contained in:
Joseph Hirschfeld
2016-03-03 03:15:41 -06:00
parent 1ae9ee1205
commit 68979dd492
8 changed files with 130 additions and 35 deletions

View File

@@ -55,7 +55,7 @@
}
}
@@ -347,6 +350,30 @@
@@ -347,6 +350,38 @@
File file5 = new File(file, fileName + ".dat");
File file6 = new File(playerDataFolder, uuid + ".dat");
@@ -65,7 +65,11 @@
+ try {
+ root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap());
+ } catch (Exception exception) {
+ io.papermc.paper.util.TraceUtil.printStackTrace(exception); // Paper
+ // Paper start
+ io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception);
+ exception.printStackTrace();
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception);
+ // Paper end
+ }
+
+ if (root != null) {
@@ -78,7 +82,11 @@
+ try {
+ NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2));
+ } catch (Exception exception) {
+ io.papermc.paper.util.TraceUtil.printStackTrace(exception); // Paper
+ // Paper start
+ io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception);
+ exception.printStackTrace();
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception);
+ // Paper end
+ }
+ }
+ // CraftBukkit end