Skip to content

Commit

Permalink
Errors handling during RBatch execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita committed Feb 24, 2017
1 parent 57aea88 commit 94a4dc9
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -184,20 +184,20 @@ private void decodeCommandBatch(ChannelHandlerContext ctx, ByteBuf in, QueueComm
CommandsData commandBatch) {
int i = state().getBatchIndex();

RedisException error = null;
Throwable error = null;
while (in.writerIndex() > in.readerIndex()) {
CommandData<Object, Object> cmd = null;
try {
checkpoint();
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();
}
}

Expand Down

0 comments on commit 94a4dc9

Please sign in to comment.