2d804382e0be1bb3d7154f650275c7daa14beb4d jcasper Mon Aug 12 07:43:51 2019 -0700 Making a hic error message more helpful, refs #22316 diff --git src/hg/lib/straw/straw.cpp src/hg/lib/straw/straw.cpp index 4626f37..9054889 100644 --- src/hg/lib/straw/straw.cpp +++ src/hg/lib/straw/straw.cpp @@ -141,31 +141,34 @@ if (c1pos1 == -100) { c1pos1 = 0; c1pos2 = length; } } if (name==chr2) { found2=true; chr2ind = i; if (c2pos1 == -100) { c2pos1 = 0; c2pos2 = length; } } } if (!found1 || !found2) { - throw strawException("One of the chromosomes wasn't found in the file. Check that the chromosome name matches the genome."); + if (chr1==chr2) + throw strawException("Chromosome " + chr1 + " wasn't found in the file. Check that the chromosome name matches the genome."); + else + throw strawException("Chromosomes " + chr1 + " and/or " + chr2 + " weren't found in the file. Check that the chromosome names match the genome."); } return master; } // reads the footer from the master pointer location. takes in the chromosomes, // norm, unit (BP or FRAG) and resolution or binsize, and sets the file // position of the matrix and the normalization vectors for those chromosomes // at the given normalization and resolution void readFooter(istream& fin, long master, int c1, int c2, string norm, string unit, int resolution, long &myFilePos, indexEntry &c1NormEntry, indexEntry &c2NormEntry) { int nBytes; fin.read((char*)&nBytes, sizeof(int)); stringstream ss; ss << c1 << "_" << c2; string key = ss.str();