}
else if (e instanceof UnavailableException) {
return new TokenRangeOfflineException(e);
}
else if (e instanceof SocketTimeoutException) {
return new TimeoutException(e);
}
else if (e instanceof TimedOutException) {
return new OperationTimeoutException(e);
}
else if (e instanceof NotFoundException) {
return new com.netflix.astyanax.connectionpool.exceptions.NotFoundException(e);
}
else if (e instanceof TApplicationException) {
return new ThriftStateException(e);
}
else if (e instanceof AuthenticationException || e instanceof AuthorizationException) {
return new com.netflix.astyanax.connectionpool.exceptions.AuthenticationException(e);
}
else if (e instanceof SchemaDisagreementException) {
return new com.netflix.astyanax.connectionpool.exceptions.SchemaDisagreementException(e);
}
else if (e instanceof TTransportException) {
if (e.getCause() != null) {
if (e.getCause() instanceof SocketTimeoutException) {
return new TimeoutException(e);
}
if (e.getCause().getMessage() != null) {
if (e.getCause().getMessage().toLowerCase().contains("connection abort")
|| e.getCause().getMessage().toLowerCase().contains("connection reset")) {
return new ConnectionAbortedException(e);