@Test public void badRequestExceptionExceptionOccursInIdleStateAndTcpConnectionRemainsActive() throws Exception { setupHandlerTo(WAITING_FOR_RESPONSE); RuntimeException cause = new DecoderException("timeout occurred", new BadRequestException("bad request", new RuntimeException("random bad request failure"))); handler.exceptionCaught(ctx, cause); verify(errorListener).proxyErrorOccurred(BAD_REQUEST, cause); verify(responseEnhancer).enhance(any(LiveHttpResponse.Transformer.class), eq(request)); verify(responseWriter).write(response(BAD_REQUEST) .header(CONTENT_LENGTH, 11) .header(CONNECTION, "close") .build()); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { eventProcessor.submit(new ChannelExceptionEvent(ctx, cause)); }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { eventProcessor.submit(new ChannelExceptionEvent(ctx, cause)); } }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { eventProcessor.submit(new ChannelExceptionEvent(ctx, cause)); } private  HttpPipelineHandler(Builder builder, RequestTracker tracker); }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { eventProcessor.submit(new ChannelExceptionEvent(ctx, cause)); } private  HttpPipelineHandler(Builder builder, RequestTracker tracker); @Override void channelActive(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause); }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { eventProcessor.submit(new ChannelExceptionEvent(ctx, cause)); } private  HttpPipelineHandler(Builder builder, RequestTracker tracker); @Override void channelActive(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause);  }