io.netty.handler.codec.DecoderException # getCause ( ) 源码实例Demo

下面列出了 io.netty.handler.codec.DecoderException # getCause ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。


@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
  if (cause instanceof DecoderException) {
    DecoderException err = (DecoderException) cause;
    cause = err.getCause();
  }
  upgradePromise.tryFail(cause);
}
 

private synchronized void handleException(Throwable t) {
  if (t instanceof DecoderException) {
    DecoderException err = (DecoderException) t;
    t = err.getCause();
  }
  handleClose(t);
}