Class NewerVersionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class NewerVersionException
    extends java.io.IOException
    An exception that this thrown when you try to read an object that was written with a newer file format than this version of Strange Eons knows how to handle.
    Since:
    3.0
    Author:
    Chris Jennings
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NewerVersionException()
      Creates a new exception with a default message.
      NewerVersionException​(java.lang.String message)
      Creates a new exception with the specified error message.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void check​(int currentVersion, int formatVersion)
      Throws a newer version exception if currentVersion is less than formatVersion.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NewerVersionException

        public NewerVersionException()
        Creates a new exception with a default message.
      • NewerVersionException

        public NewerVersionException​(java.lang.String message)
        Creates a new exception with the specified error message.
        Parameters:
        message - the error message to use
    • Method Detail

      • check

        public static void check​(int currentVersion,
                                 int formatVersion)
                          throws NewerVersionException
        Throws a newer version exception if currentVersion is less than formatVersion.
        Parameters:
        currentVersion - the format version that the caller knows how to read
        formatVersion - the format version that is reported by this object
        Throws:
        NewerVersionException - if the caller doesn't know how to read formatVersion