71145f76a119016dc1faeef92b18c116a684aa5a larrym Wed Feb 22 13:36:09 2012 -0800 remove ajaxWarnHandler code; I now stripJsEmbedded on client side which is more comprehensive b/c it catches all errors/warnings (include early errors) diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 2c7bf8b..e875957 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -5921,38 +5921,30 @@ int sessionId = cgiUsualInt(cartSessionVarName(), 0); char *hguidString = findCookieData(cookieName); int userId = (hguidString == NULL ? 0 : atoi(hguidString)); struct cart *oldCart = cartNew(userId, sessionId, NULL, NULL); cartRemoveExcept(oldCart, except); cartCheckout(&oldCart); cgiVarExcludeExcept(except); } static void addDataHubs(struct cart *cart) { hubCheckForNew(database, cart); cartSetString(cart, hgHubConnectRemakeTrackHub, "on"); } -void ajaxWarnHandler(char *format, va_list args) -{ -// When we are generating a response for ajax client and hit an error, put any warnings into hgTracks.err in the response. -char buf[4096]; -vsnprintf(buf, sizeof(buf), format, args); -jsonHashAddString(jsonForClient, "err", buf); -} - void doMiddle(struct cart *theCart) /* Print the body of an html file. */ { char *debugTmp = NULL; /* Uncomment this to see parameters for debugging. */ /* struct dyString *state = NULL; */ /* Initialize layout and database. */ cart = theCart; measureTiming = hPrintStatus() && isNotEmpty(cartOptionalString(cart, "measureTiming")); if (measureTiming) measureTime("Get cart of %d for user:%u session:%u", theCart->hash->elCount, theCart->userId, theCart->sessionId); /* #if 1 this to see parameters for debugging. */ /* Be careful though, it breaks if custom track @@ -5982,31 +5974,30 @@ initTl(); char *configPageCall = cartCgiUsualString(cart, "hgTracksConfigPage", "notSet"); /* Do main display. */ if (cartUsualBoolean(cart, "hgt.trackImgOnly", FALSE)) { trackImgOnly = TRUE; ideogramToo = cartUsualBoolean(cart, "hgt.ideogramToo", FALSE); hideControls = TRUE; withNextItemArrows = FALSE; withNextExonArrows = FALSE; hgFindMatches = NULL; // XXXX necessary ??? - pushWarnHandler(ajaxWarnHandler); } jsonForClient = newJsonHash(newHash(8)); jsonHashAddString(jsonForClient, "cgiVersion", CGI_VERSION); boolean searching = differentString(cartUsualString(cart, TRACK_SEARCH,"0"), "0"); if(!trackImgOnly) { // Write out includes for css and js files hWrites(commonCssStyles()); jsIncludeFile("jquery.js", NULL); jsIncludeFile("jquery-ui.js", NULL); jsIncludeFile("utils.js", NULL); jsIncludeFile("ajax.js", NULL); #ifdef MERGE_GENE_SUGGEST