UnavailableException ux = (UnavailableException) x;
return new CassandraInsufficientReplicasAvailableException(ux.getRequiredReplicas(), ux.getAliveReplicas(),
x.getMessage(), x);
}
if (x instanceof AlreadyExistsException) {
AlreadyExistsException aex = (AlreadyExistsException) x;
return aex.wasTableCreation() ? new CassandraTableExistsException(aex.getTable(), x.getMessage(), x)
: new CassandraKeyspaceExistsException(aex.getKeyspace(), x.getMessage(), x);
}
if (x instanceof InvalidConfigurationInQueryException) {
return new CassandraInvalidConfigurationInQueryException(x.getMessage(), x);
}
if (x instanceof InvalidQueryException) {