// if you caught NoActiveServersException but you are NOT
// firstInChain - then throw back error and don't try to reconnect
if (throwable instanceof NoActiveServersDeadEndException || throwable instanceof NoActiveServersIOException
|| (!(throwable instanceof RemoteAccessException) && !(throwable instanceof NoActiveServersException) && !(throwable instanceof IOException) && (throwable.getCause() != null && throwable.getCause().getCause() != null && !(throwable.getCause().getCause() instanceof IOException)) && (throwable.getCause() != null && !(throwable.getCause() instanceof IOException)) || (/*!firstInChain &&*/ throwable instanceof NoActiveServersException))) {
LOGGER.error(errorMessage, throwable);
throw new ClientException(throwable.toString(),throwable);
}
}
if (LOGGER.isDebugEnabled()) {
// LOGGER.warn(errorMessage + ". Exception is: " + throwable);