Changeset 27177 for trunk/psModules/src/objects/pmSourceIO_CMF_PS1_V1.c
- Timestamp:
- Mar 3, 2010, 5:11:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO_CMF_PS1_V1.c
r26964 r27177 216 216 217 217 if (table->n == 0) { 218 psFitsWriteBlank(fits, header, extname); 218 if (!psFitsWriteBlank(fits, header, extname)) { 219 psError(psErrorCodeLast(), false, "Unable to write empty sources file."); 220 psFree(table); 221 psFree(header); 222 return false; 223 } 219 224 psFree(table); 220 225 psFree(header); … … 224 229 psTrace ("pmFPAfile", 5, "writing ext data %s\n", extname); 225 230 if (!psFitsWriteTable(fits, header, table, extname)) { 226 psError( PS_ERR_IO, false, "writing ext data %s\n", extname);231 psError(psErrorCodeLast(), false, "writing ext data %s\n", extname); 227 232 psFree(table); 228 233 psFree(header); … … 486 491 487 492 if (table->n == 0) { 488 psFitsWriteBlank (fits, outhead, extname); 493 if (!psFitsWriteBlank (fits, outhead, extname)) { 494 psError(psErrorCodeLast(), false, "Unable to write empty sources."); 495 psFree(outhead); 496 psFree(table); 497 return false; 498 } 489 499 psFree (outhead); 490 500 psFree (table); … … 494 504 psTrace ("pmFPAfile", 5, "writing ext data %s\n", extname); 495 505 if (!psFitsWriteTable (fits, outhead, table, extname)) { 496 psError( PS_ERR_IO, false, "writing ext data %s\n", extname);506 psError(psErrorCodeLast(), false, "writing ext data %s\n", extname); 497 507 psFree (outhead); 498 508 psFree(table); … … 612 622 613 623 if (table->n == 0) { 614 psFitsWriteBlank (fits, outhead, extname); 624 if (!psFitsWriteBlank (fits, outhead, extname)) { 625 psError(psErrorCodeLast(), false, "Unable to write empty sources."); 626 psFree(outhead); 627 psFree(table); 628 return false; 629 } 615 630 psFree (outhead); 616 631 psFree (table); … … 620 635 psTrace ("pmFPAfile", 5, "writing ext data %s\n", extname); 621 636 if (!psFitsWriteTable (fits, outhead, table, extname)) { 622 psError( PS_ERR_IO, false, "writing ext data %s\n", extname);637 psError(psErrorCodeLast(), false, "writing ext data %s\n", extname); 623 638 psFree (outhead); 624 639 psFree(table);
Note:
See TracChangeset
for help on using the changeset viewer.
