7bc26524a7cd5a31d65b7a092f8ae0d835710efc
galt
  Mon Nov 7 16:30:52 2016 -0800
Fixes #18300. Added a missing popAbortHandler in cart.c. Trying to deal with early warnings in hgTables. In our current code, early warnings do not actually work -- instead they usually just produce a duplicate page header. But early aborts do work. So we have decided to convert the hgTables resource output exceeded warnings to errAbort.

diff --git src/hg/hgTables/longRange.c src/hg/hgTables/longRange.c
index c9fc3e6..638092c 100644
--- src/hg/hgTables/longRange.c
+++ src/hg/hgTables/longRange.c
@@ -131,31 +131,31 @@
 	    if ((idHash != NULL)&&(hashLookup(idHash, row[idFieldNum]) == NULL))
 		continue;
 
 	    int i;
 	    fprintf(f, "%s", row[columnArray[0]]);
 	    for (i=1; i<fieldCount; ++i)
 		fprintf(f, "\t%s", row[columnArray[i]]);
 	    fprintf(f, "\n");
 	    maxOut --;
 	    }
 	}
     freeMem(fileName);
     }
 
 if (maxOut == 0)
-    warn("Reached output limit of %d data values, please make region smaller,\n\tor set a higher output line limit with the filter settings.", bigFileMaxOutput());
+    errAbort("Reached output limit of %d data values, please make region smaller,\n\tor set a higher output line limit with the filter settings.", bigFileMaxOutput());
 /* Clean up and exit. */
 hashFree(&fieldHash);
 freeMem(fieldArray);
 freeMem(columnArray);
 }
 
 static void addFilteredBedsOnRegion(char *fileName, struct region *region,
 	char *table, struct asFilter *filter, struct lm *bedLm, struct bed **pBedList,
 	struct hash *idHash, int *pMaxOut)
 /* Add relevant beds in reverse order to pBedList */
 {
 struct bedTabixFile *btf = bedTabixFileMayOpen(fileName, NULL, 0, 0);
 if (!lineFileSetTabixRegion(btf->lf, region->chrom, region->start, region->end))
     return;
 char *row[6];
@@ -189,28 +189,27 @@
 /* Figure out bam file name get column info and filter. */
 struct asObject *as = longTabixAsObj();
 struct asFilter *filter = asFilterFromCart(cart, db, table, as);
 struct hash *idHash = identifierHash(db, table);
 
 /* Get beds a region at a time. */
 struct bed *bedList = NULL;
 struct region *region;
 char *fileName = bigFileNameFromCtOrHub(table, conn);
 for (region = regionList; region != NULL; region = region->next)
     {
     addFilteredBedsOnRegion(fileName, region, table, filter, lm, &bedList, idHash, &maxOut);
     freeMem(fileName);
     if (maxOut <= 0)
 	{
-	warn("Reached output limit of %d data values, please make region smaller,\n"
+	errAbort("Reached output limit of %d data values, please make region smaller,\n"
 	     "\tor set a higher output line limit with the filter settings.", bigFileMaxOutput());
-	break;
 	}
     }
 slReverse(&bedList);
 return bedList;
 }
 
 void showSchemaLongTabix(char *table, struct trackDb *tdb)
 /* Show schema on long tabix. */
 {
 }