@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { // removeFailureCounter(e.getChannel()); if (e.getChannel() != null) { LOG.info("Channel occur exception {}, cause={}", e.getChannel().getRemoteAddress(), e.getCause()); } server.closeChannel(e.getChannel()); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { LOG.warn("Channel {} has thrown exception {}",e.getChannel(),e); e.getChannel().close(); super.exceptionCaught(ctx, e); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { logger.warn("Unexpected exception from client", e.getCause()); e.getChannel().close(); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { e.getCause().printStackTrace(); e.getChannel().close(); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { LOG.warn("Unexpected exception from downstream.", e.getCause()); e.getChannel().close(); allChannels.remove(e.getChannel()); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { logger.warn("Unexpected exception from client", e.getCause()); e.getChannel().close(); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { e.getCause().printStackTrace(); e.getChannel().close(); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { if (e.getCause() instanceof ReadTimeoutException) { LOG.error("Connection timed out. Going to close channel"); e.getChannel().close(); } else { e.getCause().printStackTrace(); e.getChannel().close(); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { Channel ch = e.getChannel(); Throwable cause = e.getCause(); if (cause instanceof TooLongFrameException) { sendError(ctx, BAD_REQUEST); return; } else if (cause instanceof IOException) { if (cause instanceof ClosedChannelException) { LOG.debug("Ignoring closed channel error", cause); return; } String message = String.valueOf(cause.getMessage()); if (IGNORABLE_ERROR_MESSAGE.matcher(message).matches()) { LOG.debug("Ignoring client socket close", cause); return; } } LOG.error("Shuffle error: ", cause); if (ch.isConnected()) { LOG.error("Shuffle error " + e); sendError(ctx, INTERNAL_SERVER_ERROR); } } }
/** * @see org.jboss.netty.channel.SimpleChannelUpstreamHandler#exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext, * org.jboss.netty.channel.ExceptionEvent) */ @Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent event) { Throwable cause = event.getCause(); if (!being_closed.get()) { if (!(cause instanceof ConnectException)) { LOG.info("Connection failed:" + client.getRemoteAddr(), cause); } client.exceptionChannel(event.getChannel()); client.reconnect(); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { System.err.println(e.getCause()); DatagramChannel datagramChannel = (DatagramChannel) e.getChannel(); Session session = NettyUDPClient.CLIENTS.get(datagramChannel .getLocalAddress()); if (null != session) { Event event = Events.event(e, Events.EXCEPTION); session.onEvent(event); } }
/** * Calls {@link Channel#close()} if a TooLongFrameException was thrown */ @Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { if (e.getCause() instanceof TooLongFrameException) { e.getChannel().close(); } else { super.exceptionCaught(ctx, e); } } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { Throwable cause = e.getCause(); if (cause instanceof SpdyProtocolException) { issueSessionError(ctx, e.getChannel(), null, SpdySessionStatus.PROTOCOL_ERROR); } super.exceptionCaught(ctx, e); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { if (logger.isWarnEnabled()) { logger.warn("Unexpected exception while HTTP tunneling", e.getCause()); } e.getChannel().close(); } }
public void fireConnectionException(final ExceptionEvent e) { if (e.getCause() instanceof ClosedChannelException) { e.getChannel().close(); } else { final Thread thread = Thread.currentThread(); executor.execute(new Runnable() { @Override public void run() { ioExceptionHandler.uncaughtException(thread, WebbitException.fromExceptionEvent(e)); } }); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { if (!hasCaughtException) { hasCaughtException = true; String errMsg = e.getCause().toString(); logger.debug("UDP Handler exceptionCaught: {} . ", errMsg); e.getChannel().close(); int statusCodeInt = 1; String statusCode = statusCodeInt + " FAILURE"; udpWorker.onComplete(udpWorker.responseSb.toString(), true, errMsg, errMsg, statusCode, statusCodeInt); } }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { if(!hasCaughtException){ hasCaughtException=true; e.getChannel().close(); String errMsg = e.getCause().getLocalizedMessage(); logger.debug("TCP Handler exceptionCaught: {} . ", errMsg); int statusCodeInt = 1; String statusCode = statusCodeInt + " FAILURE"; tcpWorker.onComplete(tcpWorker.responseSb.toString(), true, errMsg, errMsg, statusCode, statusCodeInt); } } }// end handler class
public static WebbitException fromExceptionEvent(ExceptionEvent e) { return fromException(e.getCause(), e.getChannel()); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception { // handle the case of to big requests. if (e.getCause() instanceof TooLongFrameException) { DefaultHttpResponse response = new DefaultHttpResponse(HTTP_1_1, HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE); e.getChannel().write(response).addListener(ChannelFutureListener.CLOSE); } else { LogMessages.LOGGER.info(Messages.MESSAGES.exceptionCaught(), e.getCause()); e.getChannel().close(); } } }
@Override public void exceptionCaught(ChannelHandlerContext c, ExceptionEvent e) { try { exceptionReporter.reportException(e.getCause()); } catch (final Exception ee) { // Oh well } queue.close(e.getCause()); e.getChannel().close(); } }