namespace RhythmBase.Exceptions
{
///
/// Exception thrown when the version is too low.
///
public class VersionTooLowException : RhythmBaseException
{
///
/// Gets the error message.
///
public override string Message { get; }
///
/// Gets the level version that caused the exception.
///
public int LevelVersion;
///
/// Initializes a new instance of the class with the specified version.
///
/// The version that is too low.
public VersionTooLowException(int version)
{
Message = string.Format("Might not support. The version {0} is too low. Save this level with the latest version of the game to update the level version.", LevelVersion);
LevelVersion = version;
}
///
/// Initializes a new instance of the class with the specified version and inner exception.
///
/// The version that is too low.
/// The exception that is the cause of the current exception.
public VersionTooLowException(int version, Exception innerException) : base(string.Empty, innerException)
{
Message = string.Format("Might not support. The version {0} is too low. Save this level with the latest version of the game to update the level version.", version);
LevelVersion = version;
}
}
}