6401def272cf75c2bb0f52203cd37f5ca77baa77
braney
  Sun Mar 26 09:50:03 2023 -0700
get hubCheck to use new tdb->errMessage mechanism

diff --git src/hg/utils/hubCheck/hubCheck.c src/hg/utils/hubCheck/hubCheck.c
index b04e0f8..43082fa 100644
--- src/hg/utils/hubCheck/hubCheck.c
+++ src/hg/utils/hubCheck/hubCheck.c
@@ -850,30 +850,33 @@
     {
     for (tempTdb = tdb->subtracks; tempTdb != NULL; tempTdb = tempTdb->next)
         retVal |= hubCheckTrack(hub, genome, tempTdb, options, errors);
     }
 
 // for when assembly hubs have tracks with the same name, prepend assembly name to id
 safef(idName, sizeof(idName), "%s_%s", trackHubSkipHubName(genome->name), trackHubSkipHubName(tdb->track));
 
 if (options->htmlOut)
     {
     dyStringPrintf(errors, "trackData['%s'] = [", idName);
     }
 
 if (errCatchStart(errCatch))
     {
+    if (tdb->errMessage)  // if we found any errors when first reading in the trackDb
+        errAbort("%s",tdb->errMessage);
+
     hubCheckParentsAndChildren(tdb);
     if (trackIsContainer)
         retVal |= hubCheckCompositeSettings(genome, tdb, errors, options);
 
     if (tdbIsSubtrack(tdb))
         retVal |= hubCheckSubtrackSettings(genome, tdb, errors, options);
 
     // check that type line is syntactically correct regardless of
     // if we actually want to check the data file itself
     boolean foundTypeError = checkTypeLine(genome, tdb, errors, options);
 
     // No point in checking the data file if the type setting is incorrect,
     // since hubCheckBigDataUrl will error out early with a less clear message
     // if the type line is messed up. This has the added benefit of providing
     // consistent messaging on command line interface vs web interface