Changeset 7410 for trunk/psModules/src/concepts/pmConceptsRead.c
- Timestamp:
- Jun 7, 2006, 12:55:47 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConceptsRead.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConceptsRead.c
r7311 r7410 62 62 63 63 if (!concept) { 64 psError(PS_ERR_UNKNOWN, true, "Concept is NULL"); 64 65 return false; 65 66 } … … 115 116 PS_ASSERT_PTR_NON_NULL(target, false); 116 117 if (!cell) { 118 psError(PS_ERR_UNKNOWN, true, "cell is NULL"); 117 119 return false; 118 120 } … … 120 122 pmHDU *hdu = pmHDUGetLowest(NULL, NULL, cell); // The HDU at the lowest level 121 123 if (!hdu) { 124 psError(PS_ERR_UNKNOWN, true, "Can't find HDU for cell"); 122 125 return false; 123 126 } … … 178 181 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level 179 182 if (!hdu) { 183 psError(PS_ERR_UNKNOWN, true, "Can't find HDU for cell"); 180 184 return false; 181 185 } … … 184 188 psMetadata *defaults = psMetadataLookupMD(&mdok, cameraFormat, "DEFAULTS"); // The DEFAULTS spec 185 189 if (!mdok || !defaults) { 190 psError(PS_ERR_IO, true, "Failed to find \"DEFAULTS\""); 186 191 return false; 187 192 } … … 189 194 psMetadataItem *specItem = NULL; // Item from the specs metadata 190 195 bool status = true; // Status of reading concepts 196 psErrorClear(); // we're going to declare all errors "old" => won't clear stack 191 197 while ((specItem = psMetadataGetAndIncrement(specsIter))) { 192 198 pmConceptSpec *spec = specItem->data.V; // The specification … … 215 221 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level 216 222 if (!hdu) { 223 psError(PS_ERR_UNKNOWN, true, "Can't find HDU at lowest level"); 217 224 return false; 218 225 } … … 221 228 psMetadata *transSpec = psMetadataLookupMD(&mdok, cameraFormat, "TRANSLATION"); // The TRANSLATION spec 222 229 if (!mdok || !transSpec) { 230 psError(PS_ERR_IO, true, "Failed to find \"TRANSLATION\""); 223 231 return false; 224 232 } … … 253 261 if (keys->n == 1) { 254 262 // Only one key --- proceed as usual 255 headerItem = psMe tadataLookup(hdu->header, keywords);263 headerItem = psMemIncrRefCounter(psMetadataLookup(hdu->header, keywords)); 256 264 } else { 257 265 psListIterator *keysIter = psListIteratorAlloc(keys, PS_LIST_HEAD, false); // Iterator … … 275 283 status = false; 276 284 } 285 psFree(headerItem); 277 286 } 278 287 psFree(specsIter);
Note:
See TracChangeset
for help on using the changeset viewer.
