c7fdc1805832f663571ace22ba66a39efc420dc3
markd
  Thu Sep 15 12:14:04 2016 -0700
abort on bigBedItem not being found rather than core dump (this is happening because of other errors in the browser)

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index f651bd5..809c9a8 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -7229,30 +7229,33 @@
 char *fileName = bbiNameFromSettingOrTable(tdb, NULL, tdb->table);
 struct bbiFile *bbi = bigBedFileOpen(fileName);
 struct bigBedInterval *bb, *bbList = bigBedIntervalQuery(bbi, chrom, start, end, 0, lm);
 char *bedRow[32];
 char startBuf[16], endBuf[16];
 for (bb = bbList; bb != NULL; bb = bb->next)
     {
     bigBedIntervalToRow(bb, seqName, startBuf, endBuf, bedRow, ArraySize(bedRow));
     struct bed *bed = bedLoadN(bedRow, 12);
     if (sameString(bed->name, acc))
 	{
 	bb->next = NULL;
 	break;
 	}
     }
+if (bb == NULL)
+    errAbort("item %s not found in range %s:%d-%d in bigBed %s (%s)",
+             acc, chrom, start, end, tdb->table, fileName);
 psl = pslFromBigPsl(seqName, bb, &seq, &cdsString);
 genbankParseCds(cdsString,  &cdsStart, &cdsEnd);
 
 
 struct dnaSeq *rnaSeq = newDnaSeq(seq, strlen(seq), acc);
 showSomeAlignment(psl, rnaSeq, gftRna, 0, rnaSeq->size, NULL, cdsStart, cdsEnd);
 }
 
 void htcBigPslAliInWindow(char *acc)
 /* Show alignment in window for accession in bigPsl file. */
 {
 struct psl *partPsl, *wholePsl;
 char *aliTable;
 int start;
 unsigned int cdsStart = 0, cdsEnd = 0;