IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 21, 2006, 1:27:12 PM (20 years ago)
Author:
jhoblitt
Message:

add db error checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/p2insertPendingFrames.c

    r6111 r6131  
    66// NOTE this function converts the rawFrames to pendingFrames AND inserts them
    77//      this is useful since the table must be locked the whole time, to get the versions
    8 bool p2insertPendingFrames (p2Config *config, psArray *rawFrames) {
     8bool p2insertPendingFrames(p2Config *config, psArray *rawFrames) {
    99
    1010    psMetadata *where = psMetadataAlloc();
     
    5858        }
    5959       
    60         p2PendingExpInsertObject(config->database, pendingExposure);
     60        if (!p2PendingExpInsertObject(config->database, pendingExposure)) {
     61            psError(PS_ERR_UNKNOWN, false, "database access failed");
     62            return false;
     63        }
    6164
    6265        for (int i = 0; i < pendingImages->n; i++) {
    63                 p2PendingImfileInsertObject(config->database,
    64                     pendingImages->data[i]);
     66            if (!p2PendingImfileInsertObject(config->database,
     67                    pendingImages->data[i])) {
     68                psError(PS_ERR_UNKNOWN, false, "database access failed");
     69                return false;
     70            }
    6571        }
    6672    }
Note: See TracChangeset for help on using the changeset viewer.