67074bff356ac43697c6bdb66b67e53fbc6c48d0
braney
  Fri Oct 19 12:46:49 2012 -0700
output error message ( and set them in hub status) when there are errors in hub.txt or genome.txt (#8848)
diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c
index 34c6181..8c1a075 100644
--- src/hg/lib/hubConnect.c
+++ src/hg/lib/hubConnect.c
@@ -155,34 +155,39 @@
 struct hubConnectStatus *hub = NULL;
 char query[1024];
 safef(query, sizeof(query), 
     "select hubUrl,status, errorMessage from %s where id=%d", getHubStatusTableName(), id);
 struct sqlResult *sr = sqlGetResult(conn, query);
 char **row = sqlNextRow(sr);
 if (row != NULL)
     {
     AllocVar(hub);
     hub->id = id;
     hub->hubUrl = cloneString(row[0]);
     hub->status = sqlUnsigned(row[1]);
 
     char *errorMessage = cloneString(row[2]);
     if (isEmpty(errorMessage))
+	{
 	hub->trackHub = fetchHub( hub->hubUrl, &errorMessage);
     if (errorMessage != NULL)
+	    {
 	hub->errorMessage = cloneString(errorMessage);
-
+	    warn("%s", hub->errorMessage);
+	    hubUpdateStatus( hub->errorMessage, hub);
+	    }
+	}
     }
 sqlFreeResult(&sr);
 return hub;
 }
 
 struct hubConnectStatus *hubConnectStatusListFromCartAll(struct cart *cart)
 /* Return list of all track hubs that are referenced by cart. */
 {
 struct hubConnectStatus *hubList = NULL, *hub;
 struct slPair *pair, *pairList = cartVarsWithPrefix(cart, hgHubConnectHubVarPrefix);
 struct sqlConnection *conn = hConnectCentral();
 for (pair = pairList; pair != NULL; pair = pair->next)
     {
     int id = hubIdFromCartName(pair->name);
     hub = hubConnectStatusForId(conn, id);