PacketDecodeException
sealed class
The exception that is thrown when a packet cannot be decoded into its packet type.
Declaration
public sealed class PacketDecodeException : Exception
| Namespace | McProtoNet.Protocol |
| Assembly | McProtoNet.Protocol.dll |
| Source | src/McProtoNet.Protocol/Flow/PacketExceptions.cs#L6 ↗ |
Inheritance: Object → PacketDecodeException
Constructors
| Signature | Description |
|---|---|
PacketDecodeException(Type packetType, DecodeError error, Exception? inner = null) | Initializes a new instance of the PacketDecodeException class with the specified packet type, error and inner exception. |
PacketDecodeException(Type, DecodeError, Exception?)
public PacketDecodeException(Type packetType, DecodeError error, Exception? inner = null)
Initializes a new instance of the PacketDecodeException class with the specified
packet type, error and inner exception.
Parameters: packetType (Type), error (DecodeError), inner (Exception)
Properties
| Signature | Description |
|---|---|
DecodeError Error | Gets the reason the decode failed. |
Type PacketType | Gets the packet type that failed to decode. |
Error
public DecodeError Error { get; }
Gets the reason the decode failed.
Returns: DecodeError
PacketType
public Type PacketType { get; }
Gets the packet type that failed to decode.
Returns: Type