private <T> T doAndHandleException(Callable<T> action, String errorMessagePrefix) throws QuotaException {
    try {
      return action.call();
    } catch (Exception ex) {
      if (ex instanceof QuotaException) {
        throw new QuotaException(String.format("%s %s", errorMessagePrefix, ex.getMessage()),
            ((QuotaException) ex).isRetryable());
      }
      throw new QuotaException(String.format("%s unexpected exception %s", errorMessagePrefix, ex.getMessage()), true);
    }
  }
Executes the action. If the action throws an {@link Exception} this method converts it into {@link QuotaException}
using the specified parameters for the error message.
@param action the {@link Callable} to call.
@param errorMessagePrefix exception error message to use as prefix.
@param <T> the result type for {@link Callable}.
@return result of the action.
@throws QuotaException in case action throws an exception.
ambry-quota/src/main/java/com/github/ambry/quota/capacityunit/AmbryCUQuotaEnforcer.java