use of io.netty.handler.codec.http2.Http2Exception.CompositeStreamException in project netty by netty.
the class Http2ConnectionHandler method onError.
/**
* Central handler for all exceptions caught during HTTP/2 processing.
*/
@Override
public void onError(ChannelHandlerContext ctx, Throwable cause) {
Http2Exception embedded = getEmbeddedHttp2Exception(cause);
if (isStreamError(embedded)) {
onStreamError(ctx, cause, (StreamException) embedded);
} else if (embedded instanceof CompositeStreamException) {
CompositeStreamException compositException = (CompositeStreamException) embedded;
for (StreamException streamException : compositException) {
onStreamError(ctx, cause, streamException);
}
} else {
onConnectionError(ctx, cause, embedded);
}
ctx.flush();
}
Aggregations