private int parse(String versionPart, String versionPartName) throws IllegalArgumentException {
		try {
			int i = Integer.parseInt(versionPart);
			if (i < 0) {
				throw new IllegalArgumentException(versionPartName + " cannot be negative");
			}
			return i;
		}
		catch (NumberFormatException e) {
			throw new IllegalArgumentException(
				"Failed to convert " + versionPartName + " version to integer");
		}
	}
Parses a version part string to an integer.

@param versionPart A version part string.
@param versionPartName The version part name (for error reporting).
@return The version part string as an integer.
@throws IllegalArgumentException if the version part string failed to parse to a valid
  version part integer.
Ghidra/Framework/Utility/src/main/java/ghidra/framework/ApplicationVersion.java