IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Applying RHL patch. Generally improves the error handling and traceback. pmConcepts.c and pmConceptsRead.c done by PAP (RHL did this also, but I had already done them). Resolved conflicts, except for pmFPAfile.c, which uses psAbort in some instances where RHL's patch had psError; leave this for Gene to decide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConcepts.c

    r7310 r7311  
    131131    }
    132132
     133    bool success = true;                // Success in reading concepts?
    133134    if (source & PM_CONCEPT_SOURCE_CAMERA && !(*read & PM_CONCEPT_SOURCE_CAMERA)) {
    134         pmConceptsReadFromCamera(*specs, cell, target);
    135         *read |= PM_CONCEPT_SOURCE_CAMERA;
     135        if (pmConceptsReadFromCamera(*specs, cell, target)) {
     136            *read |= PM_CONCEPT_SOURCE_CAMERA;
     137        } else {
     138            psError(PS_ERR_UNKNOWN, false, "Error reading concepts from camera configuration.\n");
     139            success = false;
     140        }
    136141    }
    137142
    138143    if (source & PM_CONCEPT_SOURCE_DEFAULTS && !(*read & PM_CONCEPT_SOURCE_DEFAULTS)) {
    139         pmConceptsReadFromDefaults(*specs, fpa, chip, cell, target);
    140         *read |= PM_CONCEPT_SOURCE_DEFAULTS;
     144        if (pmConceptsReadFromDefaults(*specs, fpa, chip, cell, target)) {
     145            *read |= PM_CONCEPT_SOURCE_DEFAULTS;
     146        } else {
     147            psError(PS_ERR_UNKNOWN, false, "Error reading concepts from defaults.\n");
     148            success = false;
     149        }
    141150    }
    142151
    143152    if (source & PM_CONCEPT_SOURCE_HEADER && !(*read & PM_CONCEPT_SOURCE_HEADER)) {
    144         pmConceptsReadFromHeader(*specs, fpa, chip, cell, target);
    145         *read |= PM_CONCEPT_SOURCE_HEADER;
    146     }
    147 
     153        if (pmConceptsReadFromHeader(*specs, fpa, chip, cell, target)) {
     154            *read |= PM_CONCEPT_SOURCE_HEADER;
     155        } else {
     156            psError(PS_ERR_UNKNOWN, false, "Error reading concepts from header.\n");
     157            success = false;
     158        }
     159    }
     160
     161    #ifndef OMIT_PSDB
    148162    if (source & PM_CONCEPT_SOURCE_DATABASE && !(*read & PM_CONCEPT_SOURCE_DATABASE)) {
    149         pmConceptsReadFromDatabase(*specs, fpa, chip, cell, db, target);
    150         *read |= PM_CONCEPT_SOURCE_DATABASE;
    151     }
    152 
    153     return true;
     163        if (pmConceptsReadFromDatabase(*specs, fpa, chip, cell, db, target)) {
     164            *read |= PM_CONCEPT_SOURCE_DATABASE;
     165        } else {
     166            psError(PS_ERR_UNKNOWN, false, "Error reading concepts from database.\n");
     167            success = false;
     168        }
     169    }
     170    #endif
     171
     172    return success;
    154173}
    155174
Note: See TracChangeset for help on using the changeset viewer.