private void handleImsServiceException(ImsServiceException ex)
throws HRConnectionException {
if (ex.getCause() != null) {
if (ex.getCause() instanceof MalformedURLException) {
throw new HRInvalidUrlException(
"Invalid URL: " + getFullUrl(), ex.getCause());
}
if (ex.getCause() instanceof UnknownHostException) {
throw new HRInvalidUrlException(
"Invalid URL: " + getFullUrl(), ex.getCause());
}
if (ex.getCause() instanceof SocketTimeoutException) {
throw new HRTimeoutException(
"Timeout of " + getTimeout() + " milliseconds exceeded.", ex);