private int parsePositiveIntegerOption(String option, String optionValue) {
		try {
			int value = Integer.valueOf(optionValue);
			if (value < 0) {
				throw new IllegalArgumentException("Negative value not permitted for " + option);
			}
			return value;
		}
		catch (NumberFormatException e) {
			throw new IllegalArgumentException("Invalid integer value specified for " + option);
		}
	}
Read in any optional parameters, strip them from the parameter stream
@param command command name
@param params is the original array of command line parameters
@param discard number of params already consumed
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java