if (x instanceof TruncateException) {
return new CassandraTruncateException(x.getMessage(), x);
}
if (x instanceof UnavailableException) {
UnavailableException ux = (UnavailableException) x;
return new CassandraInsufficientReplicasAvailableException(ux.getRequiredReplicas(), ux.getAliveReplicas(),
x.getMessage(), x);
}
if (x instanceof AlreadyExistsException) {
AlreadyExistsException aex = (AlreadyExistsException) x;