Code example for InvalidParameterException

0
			System.out.println(asJsonObject.get("error").getAsJsonObject()
					.get(platform));
			throw new Error(asJsonObject.get("error").getAsJsonObject()
					.get(platform).toString());
		} else { 
			throw new InvalidParameterException(
					"there is no error for platform: " + platform);
		} 
 
	} 
 
	public void getApp(String name, int id, String platform, String path) throws NamingException, ClientProtocolException, IOException {
    	if(!Arrays.asList(platforms).contains(platform)){
    		throw new NamingException("unsupported platfom :" + platform);
    	} 
    	 
    	HttpGet httpget = new HttpGet("https://build.phonegap.com/api/v1/apps/"+ id + "/"+ platform);
		 HttpResponse response = httpclient.execute(httpget);
 
		 if(response == null){
			 throw new ConnectException("Could not connect to the server");