3d00d8348e1cb6eafec60cc3d7321f6de7e669be
braney
  Mon Dec 12 13:09:49 2022 -0800
be smarter about showing the user error messages

diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index ddeeca0..60f1dfa 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -132,30 +132,31 @@
 
 #ifdef LOWELAB
 #include "loweLabTracks.h"
 #include "rnaPLFoldTrack.h"
 #endif /* LOWELAB */
 #ifdef LOWELAB_WIKI
 #include "wiki.h"
 #endif /* LOWELAB_WIKI */
 
 #include "trackVersion.h"
 #include "genbank.h"
 #include "bedTabix.h"
 #include "knetUdc.h"
 #include "trackHub.h"
 #include "hubConnect.h"
+#include "bigWarn.h"
 
 #define CHROM_COLORS 26
 
 /* Declare our color gradients and the the number of colors in them */
 Color shadesOfGreen[EXPR_DATA_SHADES];
 Color shadesOfRed[EXPR_DATA_SHADES];
 Color shadesOfBlue[EXPR_DATA_SHADES];
 Color shadesOfYellow[EXPR_DATA_SHADES];
 Color shadesOfGreenOnWhite[EXPR_DATA_SHADES];
 Color shadesOfRedOnWhite[EXPR_DATA_SHADES];
 Color shadesOfBlueOnWhite[EXPR_DATA_SHADES];
 Color shadesOfYellowOnWhite[EXPR_DATA_SHADES];
 Color shadesOfRedOnYellow[EXPR_DATA_SHADES];
 Color shadesOfBlueOnYellow[EXPR_DATA_SHADES];
 Color orangeColor = 0;
@@ -14777,30 +14778,32 @@
 else
     hashAdd(handlerHash, name, handler);
 }
 
 #define registerTrackHandlerOnFamily(name, handler) registerTrackHandler(name, handler)
 // Marker to show that are actually registering subtracks as well.  I'd like to redo
 // this system a little.  It seems dangerous now.  There's no way to know in the .ra
 // file that there is a handler,  and as composite tracks start to allow multiple types
 // of subtracks,  the handler of the parent will still override _all_ of the children.
 // If parents and children put in different handlers, there's no way to know which one
 // the child will get.
 
 static TrackHandler lookupTrackHandler(struct trackDb *tdb)
 /* Lookup handler for track of give name.  Return NULL if none. */
 {
+if (tdb->errMessage != NULL)
+    return (TrackHandler)bigWarnMethods;
 if (handlerHash == NULL)
     return NULL;
 TrackHandler handler = hashFindVal(handlerHash, tdb->table);
 if (handler == NULL && sameString(trackHubSkipHubName(tdb->table), "cytoBandIdeo"))
     handler = hashFindVal(handlerHash, "cytoBandIdeo");
 // if nothing found, try the "trackHandler" statement
 if (handler == NULL)
     {
     char *handlerName = trackDbSetting(tdb, "trackHandler");
     if (handlerName != NULL)
         {
         handler = hashFindVal(handlerHash, handlerName);
         if (handler==NULL)
             errAbort("track %s defined a trackHandler '%s' in trackDb which does not exist",
                      tdb->track, handlerName);