code: public void sendException(Throwable throwable) {
          EventBuilder eventBuilder = new EventBuilder().withMessage(throwable.getMessage())
              .withLevel(Event.Level.ERROR)
              .withSentryInterface(new ExceptionInterface(throwable));
          sendEvent(eventBuilder);
      }
docs: Sends an exception (or throwable) to the Sentry server.
  <p>
  The exception will be logged at the {@link Event.Level#ERROR} level.
  
  @param throwable exception to send to Sentry.