private V parseVersion(String versionString) {
    // catch other exceptions and turn into an IllegalArgumentException
    try {
      return converter.apply(versionString);
    } catch (IllegalArgumentException ex) {
      throw ex; // rethrow
    } catch (Throwable ex) {
      // Gradle's GradleVersion throws all sorts of unchecked exceptions
      throw new IllegalArgumentException("unable to parse '" + versionString + "'", ex);
    }
  }
Parses and returns a version object.

@return the parsed version
@throws IllegalArgumentException if an exception occurred
jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/VersionChecker.java