Merge pull request #189 from vsoskov/jedis

---

the exception is returned in the list with the not formatted and formatted values.
Response.get throws the exception.
This commit is contained in:
Eric Hauser
2011-09-13 23:08:20 -04:00
7 changed files with 93 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ import java.util.List;
import redis.clients.jedis.Protocol.Command;
import redis.clients.jedis.exceptions.JedisConnectionException;
import redis.clients.jedis.exceptions.JedisDataException;
import redis.clients.jedis.exceptions.JedisException;
import redis.clients.util.RedisInputStream;
import redis.clients.util.RedisOutputStream;
@@ -213,7 +214,11 @@ public class Connection {
List<Object> all = new ArrayList<Object>();
flush();
while (pipelinedCommands > except) {
all.add(protocol.read(inputStream));
try{
all.add(protocol.read(inputStream));
}catch(JedisDataException e){
all.add(e);
}
pipelinedCommands--;
}
return all;