Code example for UnknownHostException

Methods: printStackTrace

0
			} 
			try { 
				SocketFactory factory = SSLSocketFactory.getDefault();
				socket = factory.createSocket(host, port);
			} catch (UnknownHostException uhe) {
				uhe.printStackTrace();
				throw new WebSocketException("unknown host: " + host, uhe);
			} catch (IOException ioe) {
				ioe.printStackTrace();
				throw new WebSocketException( 
						"error while creating secure socket to " + url, ioe);
			} 
		} else { 
			throw new WebSocketException("unsupported protocol: " + scheme);
		} 
 
		return socket;
	} 
 
	private void closeStreams() throws WebSocketException { 
		try {