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
Exception thrown when an object's version does not match its expected version.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Object created with newer software version.static final int
Object created with older software version.static final int
Object created with unknown software version. -
Constructor Summary
ConstructorDescriptionConstructor - not upgradeableVersionException
(boolean upgradable) Constructor.VersionException
(int versionIndicator, boolean upgradable) Constructor.VersionException
(String msg) Constructor - not upgradeableVersionException
(String msg, int versionIndicator, boolean upgradable) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCombine another VersionException with this one.int
Return a version indicator (OLDER_VERSION, NEWER_VERSION or UNKNOWN_VERSION).boolean
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
-
Field Details
-
UNKNOWN_VERSION
public static final int UNKNOWN_VERSIONObject created with unknown software version.- See Also:
-
OLDER_VERSION
public static final int OLDER_VERSIONObject created with older software version.- See Also:
-
NEWER_VERSION
public static final int NEWER_VERSIONObject created with newer software version.- See Also:
-
-
Constructor Details
-
VersionException
public VersionException()Constructor - not upgradeable -
VersionException
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_VERSIONupgradable
- true indicates that an upgrade is possible.
-
VersionException
Constructor.- Parameters:
msg
- detailed messageversionIndicator
- OLDER_VERSION, NEWER_VERSION or UNKNOWN_VERSIONupgradable
- 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
Combine another VersionException with this one.- Parameters:
ve
- another version exception- Returns:
- this combined version exception
-
setDetailMessage
-
getDetailMessage
-