222992ee5c992c1ba25babcb8736eadb5ad0366c braney Thu Nov 20 18:07:58 2014 -0800 when hubs disappear out from under us, put out a kindler, gentler errormessage that gives people a clue what's happened. #14365 diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index 9b45a88..d6262dc 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -2538,31 +2538,33 @@ boolean gotClade = hGotCladeConn(conn); hDisconnectCentral(&conn); return gotClade; } char *hClade(char *genome) /* If central database has clade tables, return the clade for the * given genome; otherwise return NULL. */ { char *clade; if ((clade = trackHubAssemblyClade(genome)) != NULL) return clade; if (isHubTrack(genome)) { + pushWarnHandler(cartHubWarn); warn("Current genome '%s' is supported by a hub that is no longer connected. Switching to default database.", trackHubSkipHubName(genome)); + popWarnHandler(); return cloneString("none"); } struct sqlConnection *conn = hConnectCentral(); if (hGotCladeConn(conn)) { char query[512]; sqlSafef(query, sizeof(query), "select clade from genomeClade where genome = '%s'", genome); clade = sqlQuickString(conn, query); hDisconnectCentral(&conn); if (clade == NULL) { warn("Warning: central database genomeClade doesn't contain " "genome \"%s\"", genome);