IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 8, 2006, 12:13:31 PM (20 years ago)
Author:
magnier
Message:

added error checking on pmFPAAddSourceFromHeader, dropped invalid assertion on fpa in pmFPAfileDefine, changed a psError to psTrace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfile.c

    r7433 r7443  
    134134}
    135135
    136 
     136// define a pmFPAfile, bind to the optional fpa if supplied
    137137pmFPAfile *pmFPAfileDefine(psMetadata *files, psMetadata *camera, pmFPA *fpa, char *name)
    138138{
    139139    PS_ASSERT_PTR_NON_NULL(files, NULL);
    140140    PS_ASSERT_PTR_NON_NULL(camera, NULL);
    141     PS_ASSERT_PTR_NON_NULL(fpa, NULL);
    142141    PS_ASSERT_PTR_NON_NULL(name, NULL);
    143142    PS_ASSERT_INT_POSITIVE(strlen(name), NULL);
     
    932931    psArray *infiles = psMetadataLookupPtr(&status, config->arguments, argname);
    933932    if (!status) {
    934         psError(PS_ERR_IO, false, "Failed to read %s from metadata\n", argname);
     933        psTrace("pmFPAfile", 5, "Failed to find %s in argument list", argname);
    935934        return NULL;
    936935    }
    937936    if (infiles->n < 1) {
    938         psError(PS_ERR_IO, false, "Found n == %d files in %s from metadata\n", infiles->n, argname);
     937        psError(PS_ERR_IO, false, "Found n == %d files in %s in arguments\n", infiles->n, argname);
    939938        return NULL;
    940939    }
     
    12181217        // set the view to the corresponding entry for this phu
    12191218        pmFPAview *view = pmFPAAddSourceFromHeader (file->fpa, phu, format);
     1219        if (!view) {
     1220            psError(PS_ERR_IO, false, "Unable to determine source for %s", file->name);
     1221            return NULL;
     1222        }
    12201223
    12211224        // XXX is this the correct psMD to save the filename?
Note: See TracChangeset for help on using the changeset viewer.