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 SummaryConstructorsConstructorDescriptionCreates 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 SummaryMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
InvalidPacketDataExceptionpublic InvalidPacketDataException()Creates newInvalidPacketDataExceptionwithout detail message.
- 
InvalidPacketDataExceptionConstructs anInvalidPacketDataExceptionwith the specified detail message.- Parameters:
- msg- the detail message.
 
- 
InvalidPacketDataExceptionConstructs a new exception with the specified detail message and cause.- Parameters:
- message- the detail message
- cause- the cause
 
- 
InvalidPacketDataExceptionConstruct 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.
 
- 
InvalidPacketDataExceptionpublic 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
 
 
-