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

27 lines
1.1 KiB
Diff
Raw Normal View History

2018-01-22 01:19:57 +11:00
From f19995e29d7fd8ad9d95ab56090326e01f368550 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-09-18 20:00:00 +10:00
index 845539896..399337a3e 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-08-03 23:00:00 +10:00
@@ -565,6 +565,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-11-17 10:24:35 +11:00
2.14.1
2014-04-12 14:18:37 +10:00