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

27 lines
1.1 KiB
Diff
Raw Normal View History

2017-06-08 18:00:00 +10:00
From 98f431a715e442d3588d58f49d3f2fc7dcb520be 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
2017-06-08 18:00:00 +10:00
index c68614f3b..103fda5d0 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
2017-05-14 12:00:00 +10:00
@@ -564,6 +564,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
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
CrashReport crashreport = null;
if (throwable instanceof ReportedException) {
--
2017-04-30 09:32:32 +10:00
2.11.0
2014-04-12 14:18:37 +10:00