Home / Function/ exceptionCaught() — netty Function Reference

exceptionCaught() — netty Function Reference

Architecture documentation for the exceptionCaught() function in ServerBootstrap.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3cdc83af_6f42_7ad0_b2c2_4d7c213870c4["exceptionCaught()"]
  f32a5269_a3d9_354a_3815_e297ee3f3e29["ServerBootstrapAcceptor"]
  3cdc83af_6f42_7ad0_b2c2_4d7c213870c4 -->|defined in| f32a5269_a3d9_354a_3815_e297ee3f3e29
  style 3cdc83af_6f42_7ad0_b2c2_4d7c213870c4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java lines 262–274

        @Override
        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
            final ChannelConfig config = ctx.channel().config();
            if (config.isAutoRead()) {
                // stop accept new connections for 1 second to allow the channel to recover
                // See https://github.com/netty/netty/issues/1328
                config.setAutoRead(false);
                ctx.channel().eventLoop().schedule(enableAutoReadTask, 1, TimeUnit.SECONDS);
            }
            // still let the exceptionCaught event flow through the pipeline to give the user
            // a chance to do something with it
            ctx.fireExceptionCaught(cause);
        }

Domain

Subdomains

Frequently Asked Questions

What does exceptionCaught() do?
exceptionCaught() is a function in the netty codebase, defined in transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java.
Where is exceptionCaught() defined?
exceptionCaught() is defined in transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java at line 262.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free