private static boolean exception(final boolean exception, final String message) {
        if (exception) {
            throw new IllegalBucketNameException(message);
        }
        return false;
    }
If 'exception' is true, throw an IllegalBucketNameException with the given
message. Otherwise, silently return false.

@param exception true to throw an exception
@param message the message for the exception
@return false if 'exception' is false
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/BucketNameUtils.java