IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7346


Ignore:
Timestamp:
Jun 5, 2006, 11:59:54 AM (20 years ago)
Author:
rhl
Message:

Return error rather than aborting; clean error stack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotParseCamera.c

    r7084 r7346  
    77
    88    pmFPAfile *input = pmFPAfileFromArgs (&status, config, "PSPHOT.INPUT", "INPUT");
    9     if (!status) { psAbort (__func__, "missing INPUT entry"); }
     9    if (!status) {
     10        psError(PSPHOT_ERR_CONFIG, false, "Failed to build FPA from PSPHOT.INPUT");
     11        return status;
     12    }
    1013
    1114    // select recipe options supplied on command line
     
    6265    pmFPAfileAddFileNames (config->files, "OUTPUT", output, PM_FPA_MODE_WRITE);
    6366
    64     // Chip selection: turn on only the chips specified
    65     char *chipLine = psMetadataLookupStr(NULL, config->arguments, "CHIP_SELECTIONS");
     67    // Chip selection: turn on only the chips specified (pass status to suppress missing-key log msg)
     68    char *chipLine = psMetadataLookupStr(&status, config->arguments, "CHIP_SELECTIONS");
    6669    psArray *chips = psStringSplitArray (chipLine, ",", false);
    6770    if (chips->n > 0) {
     
    7073            int chipNum = atoi(chips->data[i]);
    7174            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
    72                 psErrorStackPrint(stderr, "Chip number %d doesn't exist in camera.\n", chipNum);
    73                 exit(EXIT_FAILURE);
     75                psError(PS_ERR_IO, false, "Chip number %d doesn't exist in camera.\n", chipNum);
     76                return false;
    7477            }
    7578        }
     
    7881
    7982    psTrace(__func__, 1, "Done with psphotParseCamera...\n");
     83
     84    psErrorClear();                     // some metadata lookup may have failed
     85
    8086    return true;
    8187}
Note: See TracChangeset for help on using the changeset viewer.