IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7312


Ignore:
Timestamp:
Jun 2, 2006, 3:07:40 PM (20 years ago)
Author:
Paul Price
Message:

Resolving conflicts from both RHL and I adding error checking.

File:
1 edited

Legend:

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

    r7311 r7312  
    137137    }
    138138    fpa->hdu = psMemIncrRefCounter(hdu);
    139     if (hdu->header) {
    140         if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER, NULL)) {
    141             psError(PS_ERR_UNKNOWN, false, "Failed to read concepts for FPA");
    142             return false;
    143         }
     139    bool success = true;                // Success of reading concepts
     140    if (hdu->header && !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_HEADER, NULL)) {
     141        psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from header.\n");
     142        success = false;
    144143    }
    145144    pmFPASetFileStatus(fpa, true);
    146145
    147     return true;
     146    return success;
    148147}
    149148
     
    164163    }
    165164    chip->hdu = psMemIncrRefCounter(hdu);
    166     if (hdu->header) {
    167         pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER, true, NULL);
     165    bool success = true;                // Success of reading concepts
     166    if (hdu->header && !pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_HEADER, true, NULL)) {
     167        psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from header.\n");
     168        success = false;
    168169    }
    169170    pmChipSetFileStatus(chip, true);
    170171
    171     return true;
     172    return success;
    172173}
    173174
     
    188189    }
    189190    cell->hdu = psMemIncrRefCounter(hdu);
    190     if (hdu->header) {
    191         pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER, true, NULL);
     191    bool success = true;                // Success of reading concepts
     192    if (hdu->header && !pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER, true, NULL)) {
     193        psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from header.\n");
     194        success = false;
    192195    }
    193196    pmCellSetFileStatus(cell, true);
    194197
    195     return true;
     198    return success;
    196199}
    197200
     
    339342        }
    340343        newCell->config = psMemIncrRefCounter(cellData);
    341         if (!pmConceptsReadCell(newCell, PM_CONCEPT_SOURCE_CAMERA | PM_CONCEPT_SOURCE_DEFAULTS, false, NULL)) {
    342             psError(PS_ERR_IO, false, "Reading concepts for cell %d", numCells);
     344        if (!pmConceptsReadCell(newCell, PM_CONCEPT_SOURCE_CAMERA | PM_CONCEPT_SOURCE_DEFAULTS,
     345                                false, NULL)) {
     346            psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from camera and defaults for chip %s, "
     347                    "cell %s, type %s.  Attempting to proceed anyway...\n", chipName, cellName, cellType);
    343348            return -1;
    344349        }
     
    735740    psFree(contentsIter);
    736741
    737     pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS, NULL);
     742    if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS, NULL)) {
     743        psError(PS_ERR_UNKNOWN, false, "Unable to read concepts from defaults for FPA %s.  Attempting to "
     744                "proceed anyway.\n", currentFPAname);
     745    }
    738746
    739747    return view;
Note: See TracChangeset for help on using the changeset viewer.