code: private static String getUsefulMessage(Throwable throwable) {
          while(isBoring(throwable)) {
              throwable = throwable.getCause();
          }
  
          String message = throwable.getMessage();
          if (message == null) {
              message = throwable.getClass().getName();
          }
          return message;
      }
docs: Wrapper around getMessage method that tries to provide a meaningful
  message.  This is needed because many GSSException objects provide no
  useful information and the actual useful information is in the Throwable
  that caused the exception.