code: @Override
      public void uncaughtException(Thread thread, Throwable thrown) {
          if (enabled) {
              logger.trace("Uncaught exception received.");
  
              EventBuilder eventBuilder = new EventBuilder()
                  .withMessage(thrown.getMessage())
                  .withLevel(Event.Level.FATAL)
                  .withSentryInterface(new ExceptionInterface(thrown));
  
              try {
                  Sentry.capture(eventBuilder);
              } catch (Exception e) {
                  logger.error("Error sending uncaught exception to Sentry.", e);
              }
          }
  
          // taken from ThreadGroup#uncaughtException
          if (defaultExceptionHandler != null) {
              // call the original handler
              defaultExceptionHandler.uncaughtException(thread, thrown);
          } else if (!(thrown instanceof ThreadDeath)) {
              // CHECKSTYLE.OFF: RegexpSinglelineJava
              System.err.print("Exception in thread \"" + thread.getName() + "\" ");
              thrown.printStackTrace(System.err);
              // CHECKSTYLE.ON: RegexpSinglelineJava
          }
      }
docs: Sends any uncaught exception to Sentry, then passes the exception on to the pre-existing
  uncaught exception handler.
  
  @param thread thread that threw the error
  @param thrown the uncaught throwable