Package ca.cgjennings.io
Class NewerVersionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- ca.cgjennings.io.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 ifcurrentVersion
is less thanformatVersion
.
-
-
-
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 ifcurrentVersion
is less thanformatVersion
.- Parameters:
currentVersion
- the format version that the caller knows how to readformatVersion
- the format version that is reported by this object- Throws:
NewerVersionException
- if the caller doesn't know how to readformatVersion
-
-