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/vcf.c src/hg/hgTables/vcf.c index a9286b6..4200a97 100644 --- src/hg/hgTables/vcf.c +++ src/hg/hgTables/vcf.c @@ -297,31 +297,31 @@ 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 --; } } vcfFileFree(&vcff); 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. */ dyStringFree(&dyAlt); dyStringFree(&dyFilter); dyStringFree(&dyInfo); dyStringFree(&dyGt); 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, boolean isTabix) /* Add relevant beds in reverse order to pBedList */ { struct vcfFile *vcff; if (isTabix) @@ -377,33 +377,32 @@ struct hash *idHash = identifierHash(db, table); /* Get beds a region at a time. */ struct bed *bedList = NULL; struct region *region; for (region = regionList; region != NULL; region = region->next) { char *fileName = vcfFileName(conn, table, region->chrom); if (fileName == NULL) continue; addFilteredBedsOnRegion(fileName, region, table, filter, lm, &bedList, idHash, &maxOut, isTabix); 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; } struct slName *randomVcfIds(char *table, struct sqlConnection *conn, int count, boolean isTabix) /* Return some semi-random IDs from a VCF file. */ { /* Read 10000 items from vcf file, or if they ask for a big list, then 4x what they ask for. */ char *fileName = vcfFileName(conn, table, hDefaultChrom(database)); struct lineFile *lf = isTabix ? lineFileTabixMayOpen(fileName, TRUE) : lineFileMayOpen(fileName, TRUE); if (lf == NULL) noWarnAbort();