use of org.jboss.netty.handler.codec.frame.TooLongFrameException in project NabAlive by jcheype.
the class HttpStaticFileServerHandler method exceptionCaught.
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;
}
cause.printStackTrace();
if (ch.isConnected()) {
sendError(ctx, INTERNAL_SERVER_ERROR);
}
}
Aggregations