if (x instanceof AuthenticationException) {
return new CassandraAuthenticationException(((AuthenticationException) x).getHost(), x.getMessage(), x);
}
if (x instanceof DriverInternalError) {
return new CassandraInternalException(x.getMessage(), x);
}
if (x instanceof InvalidTypeException) {
return new CassandraTypeMismatchException(x.getMessage(), x);
}
if (x instanceof NoHostAvailableException) {