Class VersionException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LanguageVersionException

public class VersionException extends UsrException
Exception thrown when an object's version does not match its expected version.
See Also:
  • Field Details

    • UNKNOWN_VERSION

      public static final int UNKNOWN_VERSION
      Object created with unknown software version.
      See Also:
    • OLDER_VERSION

      public static final int OLDER_VERSION
      Object created with older software version.
      See Also:
    • NEWER_VERSION

      public static final int NEWER_VERSION
      Object created with newer software version.
      See Also:
  • Constructor Details

    • VersionException

      public VersionException()
      Constructor - not upgradeable
    • VersionException

      public VersionException(String msg)
      Constructor - not upgradeable
      Parameters:
      msg - detailed message
    • VersionException

      public VersionException(boolean upgradable)
      Constructor.
      Parameters:
      upgradable - true indicates that an upgrade is possible. If true the version indicator value is set to OLDER_VERSION, if false it is set to UNKNOWN_VERSION.
    • VersionException

      public VersionException(int versionIndicator, boolean upgradable)
      Constructor.
      Parameters:
      versionIndicator - OLDER_VERSION, NEWER_VERSION or UNKNOWN_VERSION
      upgradable - true indicates that an upgrade is possible.
    • VersionException

      public VersionException(String msg, int versionIndicator, boolean upgradable)
      Constructor.
      Parameters:
      msg - detailed message
      versionIndicator - OLDER_VERSION, NEWER_VERSION or UNKNOWN_VERSION
      upgradable - true indicates that an upgrade is possible.
  • Method Details

    • isUpgradable

      public boolean isUpgradable()
      Return true if the file can be upgraded to the current version.
    • getVersionIndicator

      public int getVersionIndicator()
      Return a version indicator (OLDER_VERSION, NEWER_VERSION or UNKNOWN_VERSION). Only an OLDER_VERSION has the possibility of being upgradeable.
    • combine

      public VersionException combine(VersionException ve)
      Combine another VersionException with this one.
      Parameters:
      ve - another version exception
      Returns:
      this combined version exception
    • setDetailMessage

      public void setDetailMessage(String message)
    • getDetailMessage

      public String getDetailMessage()