006f538b5a95fd704a106546add7b6cd9bd77fa3 jcasper Sun Jul 19 22:26:32 2026 -0700 Muting warnings when retrieving hic data for a region not in the hic file, refs #36444 diff --git src/hg/lib/straw/straw.h src/hg/lib/straw/straw.h index feb1228fb3e..4fe7b04857d 100644 --- src/hg/lib/straw/straw.h +++ src/hg/lib/straw/straw.h @@ -112,21 +112,30 @@ /* Added at UCSC */ void getHeaderFields(const std::string &filename, std::string &genome, std::vector &chromNames, std::vector &chromSizes, std::vector &bpResolutions, std::vector &fragResolutions, std::vector &attributes); /* Fill in the provided fields with information from the header of the hic file in the supplied filename. * fragResolutions is left empty for now, as we're not making use of it. */ class strawException : public std::runtime_error { /* Simple exception wrapper class */ public: strawException(const std::string& error): std::runtime_error(error) { } }; +class strawChromNotFoundException : public strawException { +/* Thrown when a requested chromosome is not present in the .hic file, so callers + * that prefer an empty result over an error can distinguish this case. */ + public: + strawChromNotFoundException(const std::string& error): + strawException(error) { + } +}; + std::set getNormOptions(); /* Return the set of normalization options that have been encountered through footer parsing. * The result will be empty unless at least one straw() request has been made. */ #endif