3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 00:00:28 +01:00

Only print codec netty exceptions

Dieser Commit ist enthalten in:
KennyTV 2020-06-14 18:15:09 +02:00
Ursprung b9889d2c45
Commit 8d7c7743b8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 6 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -3,10 +3,11 @@ package us.myles.ViaVersion.bukkit.handlers;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.CodecException;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.bukkit.util.NMSUtil;
import us.myles.ViaVersion.exception.CancelDecoderException;
import us.myles.ViaVersion.exception.CancelCodecException;
import us.myles.ViaVersion.exception.CancelDecoderException;
import us.myles.ViaVersion.util.PipelineUtil;
import java.lang.reflect.InvocationTargetException;
@ -56,7 +57,7 @@ public class BukkitDecodeHandler extends ByteToMessageDecoder {
if (PipelineUtil.containsCause(cause, CancelCodecException.class)) return; // ProtocolLib compat
super.exceptionCaught(ctx, cause);
if (!NMSUtil.isDebugPropertySet()) {
if (!NMSUtil.isDebugPropertySet() && PipelineUtil.containsCause(cause, CodecException.class)) {
cause.printStackTrace(); // Print if CB doesn't already do it
}
}

Datei anzeigen

@ -2,11 +2,12 @@ package us.myles.ViaVersion.bukkit.handlers;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.CodecException;
import io.netty.handler.codec.MessageToByteEncoder;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.bukkit.util.NMSUtil;
import us.myles.ViaVersion.exception.CancelEncoderException;
import us.myles.ViaVersion.exception.CancelCodecException;
import us.myles.ViaVersion.exception.CancelEncoderException;
import us.myles.ViaVersion.handlers.ChannelHandlerContextWrapper;
import us.myles.ViaVersion.handlers.ViaHandler;
import us.myles.ViaVersion.util.PipelineUtil;
@ -68,7 +69,7 @@ public class BukkitEncodeHandler extends MessageToByteEncoder implements ViaHand
if (PipelineUtil.containsCause(cause, CancelCodecException.class)) return; // ProtocolLib compat
super.exceptionCaught(ctx, cause);
if (!NMSUtil.isDebugPropertySet()) {
if (!NMSUtil.isDebugPropertySet() && PipelineUtil.containsCause(cause, CodecException.class)) {
cause.printStackTrace(); // Print if CB doesn't already do it
}
}