code: public static void verifyAndThrow(final String name, final X509Certificate cert) throws CertificateException{
  		if (!verify(name, cert)) {
  			throw new CertificateException("No name matching " + name + " found");
  		}		
  	}
docs: Perform server identify check using given name and throw CertificateException if the check fails.
  
  @param name
  @param cert
  @throws CertificateException