IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 17, 2010, 5:36:13 PM (16 years ago)
Author:
Paul Price
Message:

Being better about errors and their mapping to exit codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubMatchPSFs.c

    r26974 r26982  
    5656    psAssert(photFile, "Need photometry file.");
    5757    if (!pmFPACopy(photFile->fpa, ro->parent->parent->parent)) {
    58         psError(PS_ERR_UNKNOWN, false, "Unable to copy FPA for photometry");
     58        psError(PPSUB_ERR_CONFIG, false, "Unable to copy FPA for photometry");
    5959        return false;
    6060    }
     
    170170    if (!pmSubtractionParamsScale(kernelSize, stampSize, kernelWidths, inFWHM, refFWHM,
    171171                                  scaleRef, scaleMin, scaleMax)) {
    172         psError(PS_ERR_UNKNOWN, false, "Unable to scale parameters.");
     172        psError(PPSUB_ERR_DATA, false, "Unable to scale parameters.");
    173173        return false;
    174174    }
     
    236236        psFree(lists);
    237237        if (!detections->allSources) {
    238             psError(PS_ERR_UNKNOWN, false, "Unable to merge source lists");
     238            psError(PPSUB_ERR_DATA, false, "Unable to merge source lists");
    239239            psFree(detections);
    240240            return false;
     
    262262    pmSubtractionKernelsType type = pmSubtractionKernelsTypeFromString(typeStr); // Type of kernel
    263263    if (type == PM_SUBTRACTION_KERNEL_NONE) {
    264         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised kernel type: %s", typeStr);
     264        psError(PPSUB_ERR_ARGUMENTS, true, "Unrecognised kernel type: %s", typeStr);
    265265        return false;
    266266    }
     
    319319            break;
    320320          default:
    321             psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Invalid value for -convolve");
     321            psError(PPSUB_ERR_ARGUMENTS, false, "Invalid value for -convolve");
    322322            return false;
    323323        }
     
    325325
    326326    if (!subScaleKernel(data, widths, &size, &footprint)) {
    327         psError(PS_ERR_UNKNOWN, false, "Unable to scale kernel parameters");
     327        psError(PPSUB_ERR_DATA, false, "Unable to scale kernel parameters");
    328328        return false;
    329329    }
     
    391391            return true;
    392392        } else {
    393             psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
     393            psError(PPSUB_ERR_DATA, false, "Unable to match images.");
    394394            return false;
    395395        }
Note: See TracChangeset for help on using the changeset viewer.