f5bc6b413957f25f24799f15e836757e4f82a668 chmalee Tue Aug 22 13:27:51 2023 -0700 Make warnings show up in search results, refs #31965 diff --git src/hg/inc/cartJson.h src/hg/inc/cartJson.h index fba729c..7fe745b 100644 --- src/hg/inc/cartJson.h +++ src/hg/inc/cartJson.h @@ -31,30 +31,36 @@ * Return the string contained in its jsonElement value, or defaultVal if not found. */ char *cartJsonOptionalParam(struct hash *paramHash, char *name); /* Convenience function for a CartJsonHandler function: Look up name in paramHash. * Return the string contained in its jsonElement value, or NULL if not found. */ char *cartJsonRequiredParam(struct hash *paramHash, char *name, struct jsonWrite *jw, char *context); /* Convenience function for a CartJsonHandler function: Look up name in paramHash. * If found, return the string contained in its jsonElement value. * If not, write an error message (using context) and return NULL. */ void cartJsonRegisterHandler(struct cartJson *cj, char *command, CartJsonHandler *handler); /* Associate handler with command; when javascript sends command, handler will be executed. */ +boolean cartJsonIsNoWarns(); +/* Return TRUE if there are no warnings present */ + +void cartJsonPrintWarnings(struct jsonWrite *jw); +/* If there are warnings, write them out as JSON: */ + void cartJsonPushErrHandlers(); /* Push warn and abort handlers for errAbort. */ void cartJsonPopErrHandlers(); /* Pop warn and abort handlers for errAbort. */ void cartJsonExecute(struct cartJson *cj); /* Get commands from cgi, print Content-type, execute commands, print results as JSON. */ void cartJsonFree(struct cartJson **pCj); /* Close **pCj's contents and nullify *pCj. */ struct hgPositions *genomePosCJ(struct jsonWrite *jw, char *db, char *spec, char **retChromName, int *retWinStart, int *retWinEnd, struct cart *cart, struct searchCategory *categories, boolean categorySearch); /* Search for positions in genome that match user query.