Code example for SocketException

0
	} 
 
	@Override 
	protected void throwError(int inErrorCode, String inErrorMsg) throws IOException { 
		if (inErrorCode == 12) { 
			throw new SocketException("Could not connect to TTS server (error 12) [" + inErrorCode + "]"); 
		} else if (inErrorCode == 1) { 
			throw new IllegalStateException("Error with voice (bad state?) (error 1) [" + inErrorMsg + "]"); 
		} else if (inErrorCode == -16) { 
			throw new SocketException("Network problem (error -16) [" + inErrorMsg + "]"); 
		} else { 
			throw new IOException("Unknown error with underlying client (error " + inErrorCode + ") [" + inErrorMsg + "]"); 
		} 
	} 
}