Class CancelEncoderException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.netty.handler.codec.CodecException
io.netty.handler.codec.EncoderException
com.viaversion.viaversion.exception.CancelEncoderException
All Implemented Interfaces:
CancelCodecException, Serializable

public class CancelEncoderException extends io.netty.handler.codec.EncoderException implements CancelCodecException
Thrown during packet encoding when an outgoing packet should be cancelled. Specifically extends EncoderException to prevent netty from wrapping the exception.
See Also:
  • Field Details

  • Constructor Details

    • CancelEncoderException

      public CancelEncoderException()
    • CancelEncoderException

      public CancelEncoderException(String message, Throwable cause)
    • CancelEncoderException

      public CancelEncoderException(String message)
    • CancelEncoderException

      public CancelEncoderException(Throwable cause)
  • Method Details

    • generate

      public static CancelEncoderException generate(Throwable cause)
      Returns a cached CancelEncoderException or a new instance when ViaManager.isDebug() is true.
      Parameters:
      cause - cause for being used when a new instance is creeated
      Returns:
      a CancelEncoderException instance