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

27 lines
1.1 KiB
Diff
Raw Normal View History

2019-04-23 12:00:00 +10:00
From 7a53d357c176d46db637a614deec16f1a8b93eef 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
2019-04-23 12:00:00 +10:00
index d2d62a13..64fe2827 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
2019-04-23 12:00:00 +10:00
@@ -767,6 +767,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
2018-07-15 10:00:00 +10:00
CrashReport crashreport;
2014-04-12 14:18:37 +10:00
if (throwable instanceof ReportedException) {
--
2019-04-23 09:33:25 +10:00
2.20.1
2014-04-12 14:18:37 +10:00