IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2006, 5:10:34 PM (20 years ago)
Author:
eugene
Message:

all sorts of error handling fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroDataLoad.c

    r9374 r9574  
    11# include "psastro.h"
    2 // XXX leak free 2006.04.27
    3 
    42// this loop loads the data from the input files and selects the
    53// brighter stars for astrometry
    64// at the end of this function, the complete stellar data is loaded
    75// into the correct fpa structure locations (readout.analysis:PSPHOT.SOURCES)
    8 //
     6
    97// all of the different astrometry analysis modes use the same data load loop
    108bool psastroDataLoad (pmConfig *config) {
     
    1715    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
    1816    if (!recipe) {
    19         psErrorStackPrint(stderr, "Can't find PSASTRO recipe!\n");
    20         exit(EXIT_FAILURE);
     17        psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n");
     18        return false;
    2119    }
    2220
     
    2422    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT");
    2523    if (!input) {
    26         psErrorStackPrint(stderr, "Can't find input data!\n");
    27         exit(EXIT_FAILURE);
     24        psError(PSASTRO_ERR_CONFIG, true, "Can't find input data!\n");
     25        return false;
    2826    }
     27
    2928    // de-activate all files except PSASTRO.INPUT
    3029    pmFPAfileActivate (config->files, false, NULL);
     
    3736
    3837    while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) {
    39         psTrace (__func__, 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
     38        psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    4039        if (!chip->process || !chip->file_exists) { continue; }
    4140        pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
    4241
    4342        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
    44             psTrace (__func__, 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     43            psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    4544            if (!cell->process || !cell->file_exists) { continue; }
    4645            pmFPAfileIOChecks (config, view, PM_FPA_BEFORE);
Note: See TracChangeset for help on using the changeset viewer.