[open-ils-commits] r13813 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 11 14:49:47 EDT 2009
Author: scottmk
Date: 2009-08-11 14:49:43 -0400 (Tue, 11 Aug 2009)
New Revision: 13813
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
In doCreate(): check for a NULL pointer as a field value, and
report it by class and field name.
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-08-11 16:38:44 UTC (rev 13812)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-08-11 18:49:43 UTC (rev 13813)
@@ -1501,6 +1501,28 @@
value = jsonObjectToSimpleString( field_object );
}
+ if( ! value ) {
+ osrfAppSessionStatus(
+ ctx->session,
+ OSRF_STATUS_BADREQUEST,
+ "osrfMethodException",
+ ctx->request,
+ "No value available for column"
+ );
+ osrfLogError(
+ OSRF_LOG_MARK,
+ "%s: NULL value for field %s of class %s",
+ MODULENAME,
+ field_name,
+ osrfHashGet(meta, "classname")
+ );
+ osrfHashIteratorFree( field_itr );
+ buffer_free( val_buf );
+ buffer_free( col_buf );
+ buffer_free( table_buf );
+ *err = -1;
+ return jsonNULL;
+ }
if (first) {
first = 0;
More information about the open-ils-commits
mailing list