code: private static NlsMessage createSubMessage(Object[] errors) {
  
      Object[] messages = new Object[errors.length];
      for (int i = 0; i < messages.length; i++) {
        if (errors[i] == null) {
          messages[i] = null;
        } else if (errors[i] instanceof NlsObject) {
          messages[i] = ((NlsObject) errors[i]).toNlsMessage();
        } else if (errors[i] instanceof Throwable) {
          messages[i] = ((Throwable) errors[i]).getLocalizedMessage();
        } else {
          messages[i] = errors[i];
        }
      }
      return new ComposedNlsMessage(messages);
    }
docs: This method creates the {@link NlsMessage} wrapping the given {@code errors}.
  
  @param errors are the {@link Throwable errors} that have been collected.
  @return the combined {@link NlsMessage}.