Class InvalidPacketDataException

java.lang.Object
java.lang.Throwable
java.lang.Exception
megamek.common.net.packets.InvalidPacketDataException
All Implemented Interfaces:
Serializable

public class InvalidPacketDataException extends Exception
This exception is thrown whenever a packet data object does not match the expected type(s) and cannot be read
See Also:
  • Constructor Details

    • InvalidPacketDataException

      public InvalidPacketDataException()
      Creates new InvalidPacketDataException without detail message.
    • InvalidPacketDataException

      public InvalidPacketDataException(String msg)
      Constructs an InvalidPacketDataException with the specified detail message.
      Parameters:
      msg - the detail message.
    • InvalidPacketDataException

      public InvalidPacketDataException(String message, Throwable cause)
      Constructs a new exception with the specified detail message and cause.
      Parameters:
      message - the detail message
      cause - the cause
    • InvalidPacketDataException

      public InvalidPacketDataException(String desiredType, Object objectionable, int index)
      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