c521796a3d530b285cf15f713fac2aa0961c3bcb larrym Mon Jul 18 21:40:47 2011 -0700 add jsonErrPrintf diff --git src/hg/inc/jsHelper.h src/hg/inc/jsHelper.h index e0202d8..ae1dbe1 100644 --- src/hg/inc/jsHelper.h +++ src/hg/inc/jsHelper.h @@ -143,17 +143,20 @@ void jsAddString(struct hash *h, char *name, char *val); // Add a string to a hash which will be used to print a javascript object; // existing values are replaced. void jsAddNumber(struct hash *h, char *name, long val); // Add a number to a hash which will be used to print a javascript object; // existing values are replaced. void jsAddBoolean(struct hash *h, char *name, boolean val); // Add a boolean to a hash which will be used to print a javascript object; // existing values are replaced. void jsPrintHash(struct hash *hash, char *name, int indentLevel); // prints a hash as a javascript variable +void jsonErrPrintf(struct dyString *ds, char *format, ...); +// Printf a json error to a dyString for communicating with ajax code; format is: +// {"error": error message here} #endif /* JSHELPER_H */