code: public static void checkAndThrow(final Callable<String> messageProvider, final ExceptionStack exceptionStack) throws MultiException {
          if (exceptionStack == null || exceptionStack.isEmpty()) {
              return;
          }
  
          String message;
          try {
              message = messageProvider.call();
          } catch (Exception ex) {
              message = "?";
              ExceptionPrinter.printHistory(new NotAvailableException("MultiException", "Message", ex), LOGGER);
          }
          throw new MultiException(message, exceptionStack);
      }
docs: Method throws an exception if the given {@code exceptionStack} contains any exceptions, otherwise this method has no effect.
  <p>
  Note: The message provider is only used in case the {@code MultiException} is generated, which means any operations within the call body are only performed in case of an exception.
  
  @param messageProvider the message provider is used to deliver the {@code MultiException} headline message in case the {@code exceptionStack} contains any exceptions.
  @param exceptionStack  the stack to check.
  
  @throws MultiException is thrown if the {@code exceptionStack} contains any exceptions.