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

Loading…
Cancel
Save