IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 18, 2010, 6:42:01 PM (16 years ago)
Author:
Paul Price
Message:

Reworked ppStack to be better about error codes and their translation to exit codes.

Location:
trunk/ppStack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src

    • Property svn:ignore
      •  

        old new  
        1010stamp-h1
        1111ppStackVersionDefinitions.h
         12ppStackErrorCodes.c
         13ppStackErrorCodes.h
  • trunk/ppStack/src/ppStackSources.c

    r26898 r27004  
    116116    psMetadata *airmassZP = psMetadataLookupMetadata(NULL, recipe, "ZP.AIRMASS"); // Airmass terms
    117117    if (!airmassZP) {
    118         psError(PS_ERR_UNKNOWN, false, "Unable to find ZP.AIRMASS in recipe.");
     118        psError(PPSTACK_ERR_CONFIG, false, "Unable to find ZP.AIRMASS in recipe.");
    119119        return false;
    120120    }
     
    152152        if (!isfinite(exptime) || exptime == 0 || !isfinite(airmass) || airmass == 0 ||
    153153            !expFilter || strlen(expFilter) == 0) {
    154             psError(PS_ERR_UNEXPECTED_NULL, false,
     154            psError(PPSTACK_ERR_CONFIG, false,
    155155                    "Unable to find exposure time (%f), airmass (%f) or filter (%s)",
    156156                    exptime, airmass, expFilter);
     
    163163            airmassTerm = psMetadataLookupF32(NULL, airmassZP, filter);
    164164            if (!isfinite(airmassTerm)) {
    165                 psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     165                psError(PPSTACK_ERR_CONFIG, false,
    166166                        "Unable to find airmass term (ZP.AIRMASS) for filter %s", filter);
    167167                psFree(zp);
     
    169169            }
    170170        } else if (strcmp(filter, expFilter) != 0) {
    171             psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Filters don't match: %s vs %s", filter, expFilter);
     171            psError(PPSTACK_ERR_CONFIG, false, "Filters don't match: %s vs %s", filter, expFilter);
    172172            psFree(zp);
    173173            return false;
     
    182182    psArray *matches = pmSourceMatchSources(sourceLists, radius, true); // List of matches
    183183    if (!matches) {
    184         psError(PS_ERR_UNKNOWN, false, "Unable to match sources");
     184        psError(PPSTACK_ERR_DATA, false, "Unable to match sources");
    185185        psFree(zp);
    186186        return false;
     
    196196                                               transIter, transRej, transThresh); // Transparencies per image
    197197        if (!trans) {
    198             psError(PS_ERR_UNKNOWN, false, "Unable to measure transparencies");
     198            psError(PPSTACK_ERR_DATA, false, "Unable to measure transparencies");
    199199            return false;
    200200        }
     
    241241            psArray *matches = pmSourceMatchSources(sourceLists, radius); // List of matches
    242242            if (!matches) {
    243                 psError(PS_ERR_UNKNOWN, false, "Unable to match sources");
     243                psError(PPSTACK_ERR_DATA, false, "Unable to match sources");
    244244                psFree(zp);
    245245                return false;
     
    262262                                                  iter2, starRej2, starLimit); // Shifts for each image
    263263        if (!offsets) {
    264             psError(PS_ERR_UNKNOWN, false, "Unable to measure offsets");
     264            psError(PPSTACK_ERR_DATA, false, "Unable to measure offsets");
    265265            return false;
    266266        }
Note: See TracChangeset for help on using the changeset viewer.