Home / Function/ exceptionCaught() — netty Function Reference

exceptionCaught() — netty Function Reference

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

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  5fd671a5_e3f0_0904_b972_222bc3b5f444["exceptionCaught()"]
  9d6c5264_041f_d48d_96ff_9270dbf2d5b2["AlertValidationHandler"]
  5fd671a5_e3f0_0904_b972_222bc3b5f444 -->|defined in| 9d6c5264_041f_d48d_96ff_9270dbf2d5b2
  d2d37dde_694d_d20e_8291_0b7fcc6a37b3["testCorrectAlert()"]
  d2d37dde_694d_d20e_8291_0b7fcc6a37b3 -->|calls| 5fd671a5_e3f0_0904_b972_222bc3b5f444
  afd68690_7174_3247_87f3_c3385f487456["verifyException()"]
  5fd671a5_e3f0_0904_b972_222bc3b5f444 -->|calls| afd68690_7174_3247_87f3_c3385f487456
  style 5fd671a5_e3f0_0904_b972_222bc3b5f444 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SslErrorTest.java lines 254–279

        @Override
        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
            // Unwrap as its wrapped by a DecoderException
            Throwable unwrappedCause = cause.getCause();
            if (unwrappedCause instanceof SSLException) {
                if (exception instanceof TestCertificateException) {
                    CertPathValidatorException.Reason reason =
                            ((CertPathValidatorException) exception.getCause()).getReason();
                    if (reason == CertPathValidatorException.BasicReason.EXPIRED) {
                        verifyException(clientProvider, serverProduceError, unwrappedCause, promise, "expired");
                    } else if (reason == CertPathValidatorException.BasicReason.NOT_YET_VALID) {
                        // BoringSSL may use "expired" in this case while others use "bad"
                        verifyException(clientProvider, serverProduceError, unwrappedCause, promise, "expired", "bad");
                    } else if (reason == CertPathValidatorException.BasicReason.REVOKED) {
                        verifyException(clientProvider, serverProduceError, unwrappedCause, promise, "revoked");
                    }
                } else if (exception instanceof CertificateExpiredException) {
                    verifyException(clientProvider, serverProduceError, unwrappedCause, promise,  "expired");
                } else if (exception instanceof CertificateNotYetValidException) {
                    // BoringSSL may use "expired" in this case while others use "bad"
                    verifyException(clientProvider, serverProduceError, unwrappedCause, promise, "expired", "bad");
                } else if (exception instanceof CertificateRevokedException) {
                    verifyException(clientProvider, serverProduceError, unwrappedCause, promise, "revoked");
                }
            }
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does exceptionCaught() do?
exceptionCaught() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SslErrorTest.java.
Where is exceptionCaught() defined?
exceptionCaught() is defined in handler/src/test/java/io/netty/handler/ssl/SslErrorTest.java at line 254.
What does exceptionCaught() call?
exceptionCaught() calls 1 function(s): verifyException.
What calls exceptionCaught()?
exceptionCaught() is called by 1 function(s): testCorrectAlert.

Analyze Your Own Codebase

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

Try Supermodel Free