e36fcacb6d63cca2f344e5929b4cae77c12f1e9b
braney
  Tue Dec 5 17:34:21 2023 -0800
add the ability to simulate a custom track load error that calls
errAbort.  This used to delete the ctfile, but now just puts out a
message.

diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c
index b1e00dc..ad4b20f 100644
--- src/hg/lib/customTrack.c
+++ src/hg/lib/customTrack.c
@@ -887,30 +887,32 @@
 
 char *ctFileName = NULL;
 struct customTrack *ctList = NULL, *replacedCts = NULL;
 struct customTrack *nextCt = NULL;
 boolean removedCt = FALSE;
 
 /* load existing custom tracks from trash file */
 boolean changedCt = FALSE;
 if (customTracksExist(cart, &ctFileName))
     {
     /* protect against corrupted CT trash file or table, or transient system error */
     boolean loadFailed = FALSE;
     struct errCatch *errCatch = errCatchNew();
     if (errCatchStart(errCatch))
         {
+        if (cartOptionalString(cart, "ctTest") != NULL)
+            errAbort("ctTest set");
         ctList =
             customFactoryParse(genomeDb, ctFileName, TRUE, retBrowserLines);
         }
     errCatchEnd(errCatch);
     if (errCatch->gotError)
         {
         warn("Custom track loading error (%s): failed to load custom tracks. "
              "This is an internal error. If you want us to look into it and fix your custom track, "
              "please reach out to genome-www@soe.ucsc.edu and send us a session link "
              "where this error occurs",
              errCatch->message->string);
         loadFailed = TRUE;
         }
     errCatchFree(&errCatch);
     // If there was a failure in loading the custom tracks, return immediately -- don't try to