From 03174602f61756705685d25ee57548c09ba8209e Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 29 Jul 2014 21:33:19 -0230 Subject: [PATCH] If an IO exception comes from the datawatcher, spew it all over the console don't discard it silently. Should stop pixelmon blaming forge for their mistakes. --- .../cpw/mods/fml/common/network/internal/FMLMessage.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java b/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java index 0430d2a0d..aba4cdd75 100644 --- a/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java +++ b/fml/src/main/java/cpw/mods/fml/common/network/internal/FMLMessage.java @@ -6,11 +6,16 @@ import io.netty.buffer.Unpooled; import java.io.IOException; import java.util.List; +import org.apache.logging.log4j.Level; + +import com.google.common.base.Throwables; + import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.network.PacketBuffer; import net.minecraft.util.MathHelper; +import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.network.ByteBufUtils; import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration; @@ -189,7 +194,8 @@ public abstract class FMLMessage { entity.getDataWatcher().func_151509_a(pb); } catch (IOException e) { - // Sigh + FMLLog.log(Level.FATAL,e,"Encountered fatal exception trying to send entity spawn data watchers"); + throw Throwables.propagate(e); } buf.writeBytes(tmpBuf);