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/psastroParseCamera.c

    r9374 r9574  
    11# include "psastro.h"
    2 // XXX leak free 2006.04.27
    32
    43bool psastroParseCamera (pmConfig *config) {
     
    87    // the input image(s) are required arguments; they define the camera
    98    pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "PSASTRO.INPUT", "INPUT");
    10     if (!status) { psAbort (__func__, "missing INPUT entry"); }
     9    if (!status) {
     10        psError(PSASTRO_ERR_CONFIG, false, "Failed to build FPA from PSASTRO.INPUT");
     11        return false;
     12    }
    1113
    1214    // select recipe options supplied on command line
     
    3032            int chipNum = atoi(chips->data[i]);
    3133            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
    32                 psErrorStackPrint(stderr, "Chip number %d doesn't exist in camera.\n", chipNum);
    33                 exit(EXIT_FAILURE);
     34                psError(PSASTRO_ERR_CONFIG, true, "Chip number %d doesn't exist in camera.\n", chipNum);
     35                return false;
    3436            }
    3537        }
     
    3739    psFree (chips);
    3840
    39     psTrace(__func__, 1, "Done with psastroParseCamera...\n");
     41    psTrace("psastro", 1, "Done with psastroParseCamera...\n");
    4042    return true;
    4143}
Note: See TracChangeset for help on using the changeset viewer.