Package ghidra.util.exception

# Class VersionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
ghidra.util.exception.UsrException
ghidra.util.exception.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:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `NEWER_VERSION`
  Object created with newer software version.
  `static final int`
  `OLDER_VERSION`
  Object created with older software version.
  `static final int`
  `UNKNOWN_VERSION`
  Object created with unknown software version.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VersionException()`
  Constructor - not upgradeable
  `VersionException(boolean upgradable)`
  Constructor.
  `VersionException(int versionIndicator, boolean upgradable)`
  Constructor.
  `VersionException(String msg)`
  Constructor - not upgradeable
  `VersionException(String msg, int versionIndicator, boolean upgradable)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VersionException`
  `combine(VersionException ve)`
  Combine another VersionException with this one.
  `String`
  `getDetailMessage()`
  `int`
  `getVersionIndicator()`
  Return a version indicator (OLDER_VERSION, NEWER_VERSION or UNKNOWN_VERSION).
  `boolean`
  `isUpgradable()`
  Return true if the file can be upgraded to the current version.
  `void`
  `setDetailMessage(String message)`

  ### 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`

- ## Field Details

  - ### UNKNOWN_VERSION

    public static final int UNKNOWN_VERSION
    Object created with unknown software version.
    See Also:
      - Constant Field Values

  - ### OLDER_VERSION

    public static final int OLDER_VERSION
    Object created with older software version.
    See Also:
      - Constant Field Values

  - ### NEWER_VERSION

    public static final int NEWER_VERSION
    Object created with newer software version.
    See Also:
      - Constant Field Values

- ## 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()