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 Summary
-
Constructor Summary
ConstructorDescriptionCancelEncoderException
(String message) CancelEncoderException
(String message, Throwable cause) CancelEncoderException
(Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic CancelEncoderException
Returns a cached CancelEncoderException or a new instance whenViaManager.isDebug()
is true.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
CACHED
-
-
Constructor Details
-
CancelEncoderException
public CancelEncoderException() -
CancelEncoderException
-
CancelEncoderException
-
CancelEncoderException
-
-
Method Details
-
generate
Returns a cached CancelEncoderException or a new instance whenViaManager.isDebug()
is true.- Parameters:
cause
- cause for being used when a new instance is creeated- Returns:
- a CancelEncoderException instance
-