// TODO(peis): This doesn't have to be decode error, it can also be any network errors such as
// connection reset. Fix this ALLUXIO-2235.
@Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
    LOG.warn("Exception thrown while processing request", cause);
    // TODO(peis): This doesn't have to be decode error, it can also be any network errors such as
    // connection reset. Fix this ALLUXIO-2235.
    RPCErrorResponse resp = new RPCErrorResponse(RPCResponse.Status.DECODE_ERROR);
    ChannelFuture channelFuture = ctx.writeAndFlush(resp);
    // Close the channel because it is likely a network error.
    channelFuture.addListener(ChannelFutureListener.CLOSE);
  }
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
LOG.warn("Exception thrown while processing request", cause);
// TODO(peis): This doesn't have to be decode error, it can also be any network errors such as
// connection reset. Fix this ALLUXIO-2235.
RPCErrorResponse resp = new RPCErrorResponse(RPCResponse.Status.DECODE_ERROR);
ChannelFuture channelFuture = ctx.writeAndFlush(resp);
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
LOG.warn("Exception thrown while processing request", cause);
// TODO(peis): This doesn't have to be decode error, it can also be any network errors such as
// connection reset. Fix this ALLUXIO-2235.
RPCErrorResponse resp = new RPCErrorResponse(RPCResponse.Status.DECODE_ERROR);
ChannelFuture channelFuture = ctx.writeAndFlush(resp);
// Close the channel because it is likely a network error.
channelFuture.addListener(ChannelFutureListener.CLOSE);
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
LOG.warn("Exception thrown while processing request", cause);
// TODO(peis): This doesn't have to be decode error, it can also be any network errors such as
// connection reset. Fix this ALLUXIO-2235.
RPCErrorResponse resp = new RPCErrorResponse(RPCResponse.Status.DECODE_ERROR);
ChannelFuture channelFuture = ctx.writeAndFlush(resp);
// Close the channel because it is likely a network error.
channelFuture.addListener(ChannelFutureListener.CLOSE);
}