Package io.sentry

Class UncaughtExceptionHandlerIntegration

  • All Implemented Interfaces:
    Integration, java.io.Closeable, java.lang.AutoCloseable, java.lang.Thread.UncaughtExceptionHandler

    public final class UncaughtExceptionHandlerIntegration
    extends java.lang.Object
    implements Integration, java.lang.Thread.UncaughtExceptionHandler, java.io.Closeable
    Sends any uncaught exception to Sentry, then passes the exception on to the pre-existing uncaught exception handler.
    • Constructor Detail

      • UncaughtExceptionHandlerIntegration

        public UncaughtExceptionHandlerIntegration()
    • Method Detail

      • register

        public final void register​(@NotNull
                                   @NotNull IHub hub,
                                   @NotNull
                                   @NotNull SentryOptions options)
        Description copied from interface: Integration
        Registers an integration
        Specified by:
        register in interface Integration
        Parameters:
        hub - the Hub
        options - the options
      • uncaughtException

        public void uncaughtException​(java.lang.Thread thread,
                                      java.lang.Throwable thrown)
        Specified by:
        uncaughtException in interface java.lang.Thread.UncaughtExceptionHandler
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable