Refine search
/** * Handle the {@link Throwable} by logging and closing the {@link Channel}. Sub-classes may override this. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (logger.isWarnEnabled()) { logger.warn("Failed to initialize a channel. Closing: " + ctx.channel(), cause); } ctx.close(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { Connection connection = connectionManager.get(ctx.channel()); Logs.CONN.error("client caught ex, conn={}", connection); LOGGER.error("caught an ex, channel={}, conn={}", ctx.channel(), connection, cause); ctx.close(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { Connection connection = connectionManager.get(ctx.channel()); Logs.CONN.error("client caught ex, conn={}", connection); LOGGER.error("caught an ex, channel={}, conn={}", ctx.channel(), connection, cause); ctx.close(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { Connection connection = connectionManager.get(ctx.channel()); Logs.CONN.error("client caught ex, conn={}", connection); LOGGER.error("caught an ex, channel={}, conn={}", ctx.channel(), connection, cause); ctx.close(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof WebSocketHandshakeException) { FullHttpResponse response = new DefaultFullHttpResponse( HTTP_1_1, HttpResponseStatus.BAD_REQUEST, Unpooled.wrappedBuffer(cause.getMessage().getBytes())); ctx.channel().writeAndFlush(response).addListener(ChannelFutureListener.CLOSE); } else { ctx.fireExceptionCaught(cause); ctx.close(); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (handshakeFailed && cause instanceof DecoderException && cause.getCause() instanceof SSLException) { // Swallow an SSLException raised after handshake failure. return; } Exceptions.logIfUnexpected(logger, ctx.channel(), cause); ctx.close(); } });
/** * Handle the {@link Throwable} by logging and closing the {@link Channel}. Sub-classes may override this. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (logger.isWarnEnabled()) { logger.warn("Failed to initialize a channel. Closing: " + ctx.channel(), cause); } ctx.close(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { mockServerLogger.error("web socket client caught exception", cause); final SettableFuture<String> registrationFuture = ctx.channel().attr(REGISTRATION_FUTURE).get(); if (!registrationFuture.isDone()) { registrationFuture.setException(cause); } ctx.close(); } }