if (ex instanceof DataAccessException) {
return (DataAccessException) ex;
}
if (ex instanceof RedisCommandInterruptedException) {
return new RedisSystemException("Redis command interrupted", ex);
}
if (ex instanceof RedisException) {
return new RedisSystemException("Redis exception", ex);
}
if (ex instanceof ChannelException) {
return new RedisConnectionFailureException("Redis connection failed", ex);
}