46d0cb2f5a90285bf6fc2de3ff9a3a3f542521ff chmalee Wed May 10 10:42:02 2023 -0700 Fix for hgSearch not redirecting correctly when hgvs term is erroneous but a position can still be found. Fix hgSearch not handling errAborts and warns correctly when attempting to do a redirect, refs #31251 diff --git src/hg/cgilib/cartJson.c src/hg/cgilib/cartJson.c index 5d90342..8377856 100644 --- src/hg/cgilib/cartJson.c +++ src/hg/cgilib/cartJson.c @@ -833,42 +833,42 @@ static void cartJsonPrintWarnings(struct jsonWrite *jw) /* If there are warnings, write them out as JSON: */ { if (dyWarn && dyStringLen(dyWarn) > 0) jsonWriteString(jw, "warning", dyWarn->string); } static void cartJsonAbort() /* Print whatever warnings we have accumulated and exit. */ { if (dyWarn) puts(dyWarn->string); exit(0); } -static void cartJsonPushErrHandlers() +void cartJsonPushErrHandlers() /* Push warn and abort handlers for errAbort. */ { if (dyWarn == NULL) dyWarn = dyStringNew(0); else dyStringClear(dyWarn); pushWarnHandler(cartJsonVaWarn); pushAbortHandler(cartJsonAbort); } -static void cartJsonPopErrHandlers() +void cartJsonPopErrHandlers() /* Pop warn and abort handlers for errAbort. */ { popWarnHandler(); popAbortHandler(); } void cartJsonExecute(struct cartJson *cj) /* Get commands from cgi, print Content-type, execute commands, print results as JSON. */ { cartJsonPushErrHandlers(); puts("Content-Type:text/javascript\n"); // Initialize response JSON object: jsonWriteObjectStart(cj->jw, NULL); // Always send back hgsid: