spigot/CraftBukkit-Patches/0033-Log-Cause-of-Unexpected-Exceptions.patch

27 lines
1.1 KiB
Diff
Raw Normal View History

From 2f52af5ff266e51512d65c179e98fe45d9108166 Mon Sep 17 00:00:00 2001
2014-04-12 14:18:37 +10:00
From: md_5 <git@md-5.net>
Date: Wed, 18 Dec 2013 13:39:14 +1100
Subject: [PATCH] Log Cause of Unexpected Exceptions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4fb2b7f22..569f8597f 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2022-12-08 03:00:00 +11:00
@@ -994,6 +994,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
2014-04-12 14:18:37 +10:00
}
} catch (Throwable throwable) {
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
2014-04-12 14:18:37 +10:00
+ // Spigot Start
+ if ( throwable.getCause() != null )
+ {
+ MinecraftServer.LOGGER.error( "\tCause of unexpected exception was", throwable.getCause() );
2014-04-12 14:18:37 +10:00
+ }
+ // Spigot End
2022-03-01 02:00:00 +11:00
CrashReport crashreport = constructOrExtractCrashReport(throwable);
2014-04-12 14:18:37 +10:00
2022-03-01 02:00:00 +11:00
this.fillSystemReport(crashreport.getSystemReport());
2014-04-12 14:18:37 +10:00
--
2.40.0
2014-04-12 14:18:37 +10:00