Changeset 33360
- Timestamp:
- Feb 24, 2012, 7:50:04 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/mextract.c
r33314 r33360 462 462 // load the list of hosts 463 463 SkyTable *sky = GetSkyTable(); 464 if (!sky) return FALSE; 464 if (!sky) { 465 gprint (GP_ERR, "failed to load sky table for database\n"); 466 return FALSE; 467 } 465 468 466 469 char *tmppath = GetCATDIR (); 467 if (!tmppath) return FALSE; 470 if (!tmppath) { 471 gprint (GP_ERR, "failed to get CATDIR for database\n"); 472 return FALSE; 473 } 468 474 469 475 char *CATDIR = abspath (tmppath, MAX_PATH_LENGTH); 470 if (!CATDIR) return FALSE; 476 if (!CATDIR) { 477 gprint (GP_ERR, "failed to make an absolute path from %s (too long)\n", tmppath); 478 return FALSE; 479 } 471 480 472 481 HostTable *table = HostTableLoad (CATDIR, sky->hosts); 473 482 if (!table) { 474 fprintf (stderr, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR);483 gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR); 475 484 return FALSE; 476 485 } … … 485 494 // determine time reference and format 486 495 char *TimeRef = get_variable ("TIMEREF"); 487 if (!TimeRef) return FALSE; 496 if (!TimeRef) { 497 gprint (GP_ERR, "failed to find TIMEREF variable\n"); 498 return FALSE; 499 } 488 500 489 501 char *TimeFormat = get_variable ("TIMEFORMAT"); 490 if (!TimeFormat) return FALSE; 502 if (!TimeFormat) { 503 gprint (GP_ERR, "failed to find TIMEFORMAT variable\n"); 504 return FALSE; 505 } 491 506 492 507 char tmp; … … 502 517 503 518 if (PARALLEL_MANUAL) { 504 fprintf (stderr, "run the relphot_client commands above. when these are done, hit return\n");519 gprint (GP_ERR, "run the relphot_client commands above. when these are done, hit return\n"); 505 520 getchar(); 506 521 } … … 528 543 if (ResultFile) { 529 544 int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nvec, FALSE, NULL); 530 if (!status) return FALSE; 545 if (!status) { 546 gprint (GP_ERR, "failed to write result file %s\n", ResultFile); 547 return FALSE; 548 } 531 549 } 532 550
Note:
See TracChangeset
for help on using the changeset viewer.
