private void handleException(Exception e, boolean loggit) {
      boolean safe = isClosed() || getAdvisee().getCancelCriterion().isCancelInProgress();
      if (!safe) {
        if (ENFORCE_SAFE_CLOSE) {
          Assert.assertTrue(safe,
              "BucketAdvisor was not closed properly.");
        } else if (loggit) {
          logger.warn("BucketAdvisor was not closed properly.", e);
        }
      }
    }
Called from catch blocks in {@link #doVolunteerForPrimary()}. Handles the exception properly
based on advisor settings and shutdown condition.

@param e the RuntimeException that was caught while volunteering
@param loggit true if message should be logged if shutdown condition is not met
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java