Errors handling during RBatch execution

pull/787/head
Nikita 8 years ago
parent 57aea881c5
commit 94a4dc9183

@ -184,7 +184,7 @@ public class CommandDecoder extends ReplayingDecoder<State> {
CommandsData commandBatch) { CommandsData commandBatch) {
int i = state().getBatchIndex(); int i = state().getBatchIndex();
RedisException error = null; Throwable error = null;
while (in.writerIndex() > in.readerIndex()) { while (in.writerIndex() > in.readerIndex()) {
CommandData<Object, Object> cmd = null; CommandData<Object, Object> cmd = null;
try { try {
@ -192,12 +192,12 @@ public class CommandDecoder extends ReplayingDecoder<State> {
state().setBatchIndex(i); state().setBatchIndex(i);
cmd = (CommandData<Object, Object>) commandBatch.getCommands().get(i); cmd = (CommandData<Object, Object>) commandBatch.getCommands().get(i);
decode(in, cmd, null, ctx.channel()); decode(in, cmd, null, ctx.channel());
i++; } catch (Exception e) {
} catch (IOException e) {
cmd.tryFailure(e); cmd.tryFailure(e);
} }
i++;
if (!cmd.isSuccess()) { if (!cmd.isSuccess()) {
error = (RedisException) cmd.cause(); error = cmd.cause();
} }
} }

Loading…
Cancel
Save