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

27 lines
1.1 KiB
Diff
Raw Normal View History

2018-07-22 12:00:00 +10:00
From 2baf905d9336b0fa0eadf228279e0136ba1e8878 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
2018-07-22 12:00:00 +10:00
index e1732045e..fdebfc5c7 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
2018-07-22 12:00:00 +10:00
@@ -695,6 +695,12 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
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
2018-07-15 10:00:00 +10:00
CrashReport crashreport;
2014-04-12 14:18:37 +10:00
if (throwable instanceof ReportedException) {
--
2018-07-15 10:00:00 +10:00
2.17.1
2014-04-12 14:18:37 +10:00