Package megamek.common.net.packets
Class InvalidPacketDataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
megamek.common.net.packets.InvalidPacketDataException
- All Implemented Interfaces:
Serializable
This exception is thrown whenever a packet data object does not match the expected type(s) and cannot be read
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates newInvalidPacketDataExceptionwithout detail message.Constructs anInvalidPacketDataExceptionwith the specified detail message.InvalidPacketDataException(String desiredType, Object objectionable, int index) Construct a new exception with desired object type, the object in question, and its specified indexInvalidPacketDataException(String desiredType, Object objectionable, int index, Throwable cause) Construct a new exception with desired object type, the object in question, and its specified indexInvalidPacketDataException(String message, Throwable cause) Constructs a new exception with the specified detail message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidPacketDataException
public InvalidPacketDataException()Creates newInvalidPacketDataExceptionwithout detail message. -
InvalidPacketDataException
Constructs anInvalidPacketDataExceptionwith the specified detail message.- Parameters:
msg- the detail message.
-
InvalidPacketDataException
Constructs a new exception with the specified detail message and cause.- Parameters:
message- the detail messagecause- the cause
-
InvalidPacketDataException
Construct a new exception with desired object type, the object in question, and its specified index- Parameters:
desiredType- String naming the type that was expected but not found.objectionable- Object we didn't like.index- int containing the object's position within the packet's data.
-
InvalidPacketDataException
public InvalidPacketDataException(String desiredType, Object objectionable, int index, Throwable cause) Construct a new exception with desired object type, the object in question, and its specified index- Parameters:
desiredType- String naming the type that was expected but not found.objectionable- Object we didn't like.index- int containing the object's position within the packet's data.cause- Throwable that initiated the exception
-