8fc04f0d2d4ff08ea7ba0f45ec21f440140cfac2 angie Wed Aug 30 12:15:29 2017 -0700 When a searchTrix file doesn't exist, warn instead of aborting with an otherwise empty page. diff --git src/hg/lib/bigBedFind.c src/hg/lib/bigBedFind.c index 488f098..920442e 100644 --- src/hg/lib/bigBedFind.c +++ src/hg/lib/bigBedFind.c @@ -128,32 +128,40 @@ { struct sqlConnection *conn = hAllocConnTrack(db, tdb); fileName = bbiNameFromSettingOrTable(tdb, conn, tdb->table); hFreeConn(&conn); } if (!(indexField && fileName)) continue; struct slName *indexList = slNameListFromString(indexField, ','); struct hgPos *posList1 = NULL, *posList2 = NULL; char *trixFile = trackDbSetting(tdb, "searchTrix"); // if there is a trix file, use it to search for the term if (trixFile != NULL) { + struct errCatch *errCatch = errCatchNew(); + if (errCatchStart(errCatch)) + { posList1 = doTrixSearch(hReplaceGbdb(trixFile), indexList, fileName, term, NULL); } + errCatchEnd(errCatch); + if (errCatch->gotError) + warn("trix search failure for %s: %s", tdb->table, dyStringContents(errCatch->message)); + errCatchFree(&errCatch); + } // now search for the raw id's struct slName *oneIndex=indexList; for (; oneIndex; oneIndex = oneIndex->next) { posList2 = getPosFromBigBed(fileName, oneIndex->name, term, NULL); posList1 = slCat(posList1, posList2); } if (posList1 != NULL) { struct hgPosTable *table; found = TRUE; AllocVar(table);