Index: trunk/ippTools/src/p2insertPendingFrames.c
===================================================================
--- trunk/ippTools/src/p2insertPendingFrames.c	(revision 6111)
+++ trunk/ippTools/src/p2insertPendingFrames.c	(revision 6131)
@@ -6,5 +6,5 @@
 // NOTE this function converts the rawFrames to pendingFrames AND inserts them
 //      this is useful since the table must be locked the whole time, to get the versions
-bool p2insertPendingFrames (p2Config *config, psArray *rawFrames) {
+bool p2insertPendingFrames(p2Config *config, psArray *rawFrames) {
 
     psMetadata *where = psMetadataAlloc();
@@ -58,9 +58,15 @@
         }
         
-        p2PendingExpInsertObject(config->database, pendingExposure);
+        if (!p2PendingExpInsertObject(config->database, pendingExposure)) {
+            psError(PS_ERR_UNKNOWN, false, "database access failed");
+            return false;
+        }
 
         for (int i = 0; i < pendingImages->n; i++) {
-                p2PendingImfileInsertObject(config->database,
-                    pendingImages->data[i]);
+            if (!p2PendingImfileInsertObject(config->database,
+                    pendingImages->data[i])) {
+                psError(PS_ERR_UNKNOWN, false, "database access failed");
+                return false;
+            }
         }
     }
