Example usage for com.amazonaws.services.codebuild.model InvalidInputException InvalidInputException

List of usage examples for com.amazonaws.services.codebuild.model InvalidInputException InvalidInputException

Introduction

In this page you can find the example usage for com.amazonaws.services.codebuild.model InvalidInputException InvalidInputException.

Prototype

public InvalidInputException(String message) 

Source Link

Document

Constructs a new InvalidInputException with the specified error message.

Usage

From source file:Validation.java

License:Open Source License

public static void checkAWSClientFactoryConfig(String proxyHost, String proxyPort, String awsAccessKey,
        String awsSecretKey) throws InvalidInputException {
    if (awsAccessKey == null || awsAccessKey.isEmpty() || awsSecretKey == null || awsSecretKey.isEmpty()) {
        throw new InvalidInputException(invalidKeysError);
    }// w  w w. j a  v  a  2s.c  om

    if (proxyHost != null && !proxyHost.isEmpty()) {
        Integer proxyPortInt = Validation.parseInt(proxyPort);
        if (proxyPortInt != null && proxyPortInt < 0) {
            throw new InvalidInputException(invalidProxyError);
        }
    }
}