IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 25, 2010, 4:26:50 PM (16 years ago)
Author:
Paul Price
Message:

Reworking error codes to get consistent exit codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpArguments.c

    r25538 r27096  
    2626    // load config data from default locations
    2727    pmConfig *config = pmConfigRead(&argc, argv, PSWARP_RECIPE);
    28     if (config == NULL) {
    29         psError(PSWARP_ERR_CONFIG, false, "Can't read site configuration");
     28    if (!config) {
     29        psError(psErrorCodeLast(), false, "Can't read configuration");
    3030        return NULL;
    3131    }
     
    3333    // save the following additional recipe values based on command-line options
    3434    // these options override the PSWARP recipe values loaded from recipe files
    35     pmConfigRecipeOptions (config, PSWARP_RECIPE);
     35    if (!pmConfigRecipeOptions(config, PSWARP_RECIPE)) {
     36        psError(psErrorCodeLast(), false, "Can't do something with recipes");
     37        psFree(config);
     38        return NULL;
     39    }
    3640
    3741    pmConfigFileSetsMD(config->arguments, &argc, argv, "ASTROM",   "-astrom", "-astromlist");
     
    7276        psThreadPoolInit (nThreads);
    7377    }
    74     pswarpSetThreads ();
     78    pswarpSetThreads();
    7579
    7680    if ((N = psArgumentGet(argc, argv, "-dumpconfig"))) {
     
    160164    bool PSF = psMetadataLookupBool(&status, recipe, "PSF"); ///< Generate a PSF model?
    161165    if (!status) {
    162         PSF = true;
     166        PSF = true;
    163167        psWarning("PSF is not set in the %s recipe --- defaulting to TRUE.", PSWARP_RECIPE);
    164168    }
Note: See TracChangeset for help on using the changeset viewer.