aa675de1a849fe445eb1924f7f26707810df1c89 kate Mon May 15 15:48:22 2017 -0700 Better error checking for hubs and custom tracks. refs #18736 diff --git src/hg/hgTracks/barChartTrack.c src/hg/hgTracks/barChartTrack.c index ce555c0..1ed4e32 100644 --- src/hg/hgTracks/barChartTrack.c +++ src/hg/hgTracks/barChartTrack.c @@ -63,32 +63,34 @@ char *getCategoryName(struct track *tg, int id) /* Get category name from id, cacheing */ { struct barChartCategory *categ; int count = getCategoryCount(tg); struct barChartTrack *info = (struct barChartTrack *)tg->extraUiData; if (!info->categNames) { struct barChartCategory *categs = getCategories(tg); AllocArray(info->categNames, count); for (categ = categs; categ != NULL; categ = categ->next) info->categNames[categ->id] = cloneString(categ->name); } if (id >= count) - //errAbort("Bar chart track: can't find id %d\n", id); + { + warn("Bar chart track: can't find id %d\n", id); return NULL; // Exclude this category + } return info->categNames[id]; } char *getCategoryLabel(struct track *tg, int id) /* Get category descriptive label from id, cacheing */ { struct barChartTrack *info = (struct barChartTrack *)tg->extraUiData; struct barChartCategory *categ; int count = getCategoryCount(tg); if (!info->categLabels) { struct barChartCategory *categs = getCategories(tg); AllocArray(info->categLabels, count); for (categ = categs; categ != NULL; categ = categ->next) info->categLabels[categ->id] = cloneString(categ->label);